Skip to content

Commit 868ac50

Browse files
committed
Apply fixes from StyleCI
1 parent cca4cc5 commit 868ac50

11 files changed

+105
-105
lines changed

src/CacheInstanceClasses.php

+11-11
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ class CacheInstanceClasses
1212
public static function general()
1313
{
1414
return [
15-
'cache.t3.micro' => 'cache.t3.micro - (2 VCPU, 0.5Gib RAM) - Free Tier Eligible ~$13 / month',
16-
'cache.t3.small' => 'cache.t3.small - (2 VCPU, 1.37Gib RAM) - ~$25 / month',
17-
'cache.t3.medium' => 'cache.t3.medium - (2 VCPU, 3.09Gib RAM) - ~$50 / month',
18-
'cache.m5.large' => 'cache.m5.large - (2 VCPU, 6.38Gib RAM) - ~$112 / month',
19-
'cache.m5.xlarge' => 'cache.m5.xlarge - (4 VCPU, 12.93Gib RAM) - ~$224 / month',
20-
'cache.m5.2xlarge' => 'cache.m5.2xlarge - (8 VCPU, 26.04Gib RAM) - ~$449 / month',
21-
'cache.m5.4xlarge' => 'cache.m5.4xlarge - (16 VCPU, 52.26Gib RAM) - ~$897 / month',
15+
'cache.t3.micro' => 'cache.t3.micro - (2 VCPU, 0.5Gib RAM) - Free Tier Eligible ~$13 / month',
16+
'cache.t3.small' => 'cache.t3.small - (2 VCPU, 1.37Gib RAM) - ~$25 / month',
17+
'cache.t3.medium' => 'cache.t3.medium - (2 VCPU, 3.09Gib RAM) - ~$50 / month',
18+
'cache.m5.large' => 'cache.m5.large - (2 VCPU, 6.38Gib RAM) - ~$112 / month',
19+
'cache.m5.xlarge' => 'cache.m5.xlarge - (4 VCPU, 12.93Gib RAM) - ~$224 / month',
20+
'cache.m5.2xlarge' => 'cache.m5.2xlarge - (8 VCPU, 26.04Gib RAM) - ~$449 / month',
21+
'cache.m5.4xlarge' => 'cache.m5.4xlarge - (16 VCPU, 52.26Gib RAM) - ~$897 / month',
2222
'cache.m5.12xlarge' => 'cache.m5.12xlarge - (48 VCPU, 157.12Gib RAM) - ~$2696 / month',
2323
'cache.m5.24xlarge' => 'cache.m5.24xlarge - (96 VCPU, 314.32Gib RAM) - ~$5392 / month',
2424
];
@@ -32,10 +32,10 @@ public static function general()
3232
public static function memory()
3333
{
3434
return [
35-
'cache.r5.large' => 'cache.r5.large - (2 VCPU, 13.07Gib RAM) - ~$156 / month',
36-
'cache.r5.xlarge' => 'cache.r5.xlarge - (4 VCPU, 26.32GiB RAM) - ~$310 / month',
37-
'cache.r5.2xlarge' => 'cache.r5.2xlarge - (8 VCPU, 52.82GiB RAM) - ~$621 / month',
38-
'cache.r5.4xlarge' => 'cache.r5.4xlarge - (16 VCPU, 105.81GiB RAM) - ~$1241 / month',
35+
'cache.r5.large' => 'cache.r5.large - (2 VCPU, 13.07Gib RAM) - ~$156 / month',
36+
'cache.r5.xlarge' => 'cache.r5.xlarge - (4 VCPU, 26.32GiB RAM) - ~$310 / month',
37+
'cache.r5.2xlarge' => 'cache.r5.2xlarge - (8 VCPU, 52.82GiB RAM) - ~$621 / month',
38+
'cache.r5.4xlarge' => 'cache.r5.4xlarge - (16 VCPU, 105.81GiB RAM) - ~$1241 / month',
3939
'cache.r5.12xlarge' => 'cache.r5.12xlarge - (48 VCPU, 317.77GiB RAM) - ~$3732 / month',
4040
'cache.r5.24xlarge' => 'cache.r5.24xlarge - (96 VCPU, 635.61GiB RAM) - ~$7465 / month',
4141
];

src/Commands/DatabaseScaleCommand.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ protected function determineRdsInstanceClass()
6464
{
6565
$type = $this->menu('Which type of database instance would you like to scale to?', [
6666
'general' => 'General Purpose',
67-
'memory' => 'Memory Optimized',
67+
'memory' => 'Memory Optimized',
6868
]);
6969

7070
if ($type == 'general') {

src/Commands/EnvCommand.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ public function handle()
4444
);
4545

4646
Manifest::addEnvironment($environment, [
47-
'memory' => 1024,
47+
'memory' => 1024,
4848
'cli-memory' => 512,
49-
'runtime' => $this->option('docker') ? 'docker' : 'php-8.2:al2',
50-
'build' => [
49+
'runtime' => $this->option('docker') ? 'docker' : 'php-8.2:al2',
50+
'build' => [
5151
'COMPOSER_MIRROR_PATH_REPOS=1 composer install --no-dev',
5252
'php artisan event:cache',
5353
file_exists(Path::current().'/webpack.mix.js')

src/Commands/EnvDescribeCommand.php

+13-13
Original file line numberDiff line numberDiff line change
@@ -51,20 +51,20 @@ public function handle()
5151
$domain = count($domains) ? $domains[0] : null;
5252

5353
$description = [
54-
'project_id' => $environment['project_id'],
55-
'uuid' => $environment['uuid'],
56-
'id' => $environment['id'],
57-
'name' => $environment['name'],
58-
'vanity_domain' => $environment['vanity_domain'],
59-
'latest_deployment_id' => $environment['latest_deployment_id'],
54+
'project_id' => $environment['project_id'],
55+
'uuid' => $environment['uuid'],
56+
'id' => $environment['id'],
57+
'name' => $environment['name'],
58+
'vanity_domain' => $environment['vanity_domain'],
59+
'latest_deployment_id' => $environment['latest_deployment_id'],
6060
'latest_deployment_status' => $environment['latest_deployment'] ? $environment['latest_deployment']['status'] : null,
61-
'latest_deployment_url' => 'https://vapor.laravel.com/app/projects/'.$environment['project_id'].'/environments/'.$environment['name'].'/deployments/'.$environment['latest_deployment_id'],
62-
'deployment_status' => $environment['deployment_status'],
63-
'domains' => $domains,
64-
'domain' => $domain,
65-
'management_url' => 'https://vapor.laravel.com/app/projects/'.$environment['project_id'].'/environments/'.$environment['name'],
66-
'vanity_url' => 'https://'.$environment['vanity_domain'],
67-
'custom_url' => $domain ? 'https://'.$domain : null,
61+
'latest_deployment_url' => 'https://vapor.laravel.com/app/projects/'.$environment['project_id'].'/environments/'.$environment['name'].'/deployments/'.$environment['latest_deployment_id'],
62+
'deployment_status' => $environment['deployment_status'],
63+
'domains' => $domains,
64+
'domain' => $domain,
65+
'management_url' => 'https://vapor.laravel.com/app/projects/'.$environment['project_id'].'/environments/'.$environment['name'],
66+
'vanity_url' => 'https://'.$environment['vanity_domain'],
67+
'custom_url' => $domain ? 'https://'.$domain : null,
6868
];
6969

7070
if ($this->option('list')) {

src/Commands/LocalCommand.php

+9-9
Original file line numberDiff line numberDiff line change
@@ -106,36 +106,36 @@ protected function dockerConfiguration()
106106
}
107107

108108
return [
109-
'version' => '3.7',
109+
'version' => '3.7',
110110
'services' => [
111111
'redis' => [
112-
'image' => 'redis:alpine',
112+
'image' => 'redis:alpine',
113113
'volumes' => [
114114
'vapor_redis:/data',
115115
],
116116
'restart' => 'always',
117117
],
118118
'mysql' => [
119-
'image' => 'mysql:8.0',
119+
'image' => 'mysql:8.0',
120120
'volumes' => [
121121
0 => 'vapor_mysql:/var/lib/mysql',
122122
],
123-
'restart' => 'always',
123+
'restart' => 'always',
124124
'environment' => [
125125
'MYSQL_ROOT_PASSWORD' => 'secret',
126-
'MYSQL_DATABASE' => 'vapor',
127-
'MYSQL_USER' => 'vapor',
128-
'MYSQL_PASSWORD' => 'secret',
126+
'MYSQL_DATABASE' => 'vapor',
127+
'MYSQL_USER' => 'vapor',
128+
'MYSQL_PASSWORD' => 'secret',
129129
],
130130
],
131131
'app' => [
132-
'image' => static::$images[$this->option('php') ? $this->option('php') : '8.2'],
132+
'image' => static::$images[$this->option('php') ? $this->option('php') : '8.2'],
133133
'depends_on' => [
134134
0 => 'mysql',
135135
1 => 'redis',
136136
],
137137
'restart' => 'always',
138-
'init' => true,
138+
'init' => true,
139139
],
140140
],
141141
'volumes' => [

src/Commands/ProjectDescribeCommand.php

+6-6
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,13 @@ public function handle()
4747
$project = $this->vapor->project(Manifest::id());
4848

4949
$description = [
50-
'id' => $project['id'],
51-
'name' => $project['name'],
52-
'team_id' => $project['team_id'],
53-
'team_name' => $project['team']['name'],
54-
'region' => $project['region'],
50+
'id' => $project['id'],
51+
'name' => $project['name'],
52+
'team_id' => $project['team_id'],
53+
'team_name' => $project['team']['name'],
54+
'region' => $project['region'],
5555
'github_repository' => $project['github_repository'],
56-
'management_url' => 'https://vapor.laravel.com/app/projects/'.$project['id'],
56+
'management_url' => 'https://vapor.laravel.com/app/projects/'.$project['id'],
5757
];
5858

5959
if ($this->option('list')) {

src/Commands/RetrievesProviderCredentials.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ protected function getAWSCredentials()
1919
}
2020

2121
return [
22-
'key' => Helpers::ask('What is your AWS user key'),
22+
'key' => Helpers::ask('What is your AWS user key'),
2323
'secret' => Helpers::secret('What is your AWS user secret'),
2424
];
2525
}
@@ -36,7 +36,7 @@ protected function getCredentialsFromFile()
3636
);
3737

3838
return [
39-
'key' => $credentials[$credential]['aws_access_key_id'],
39+
'key' => $credentials[$credential]['aws_access_key_id'],
4040
'secret' => $credentials[$credential]['aws_secret_access_key'],
4141
];
4242
}

src/ConsoleVaporClient.php

+31-31
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ public function login($email, $password, $twoFactorAuthenticationToken = null)
2121
{
2222
try {
2323
return $this->request('post', '/api/login', [
24-
'host' => gethostname(),
25-
'email' => $email,
26-
'password' => $password,
24+
'host' => gethostname(),
25+
'email' => $email,
26+
'password' => $password,
2727
'two_factor_token' => $twoFactorAuthenticationToken,
2828
])['access_token'];
2929
} catch (ClientException $e) {
@@ -102,7 +102,7 @@ public function teamMembers()
102102
public function addTeamMember($email, array $permissions)
103103
{
104104
$this->requestWithErrorHandling('post', '/api/teams/'.Helpers::config('team').'/members', [
105-
'email' => $email,
105+
'email' => $email,
106106
'permissions' => $permissions,
107107
]);
108108
}
@@ -232,7 +232,7 @@ public function createZone($providerId, $zone)
232232
{
233233
return $this->requestWithErrorHandling('post', '/api/teams/'.Helpers::config('team').'/zones', [
234234
'cloud_provider_id' => $providerId,
235-
'zone' => $zone,
235+
'zone' => $zone,
236236
]);
237237
}
238238

@@ -270,8 +270,8 @@ public function records($zoneId)
270270
public function createRecord($zoneId, $type, $name, $value)
271271
{
272272
return $this->requestWithErrorHandling('put', '/api/zones/'.$zoneId.'/records', [
273-
'type' => $type,
274-
'name' => $name,
273+
'type' => $type,
274+
'name' => $name,
275275
'value' => $value,
276276
]);
277277
}
@@ -323,9 +323,9 @@ public function network($networkId)
323323
public function createNetwork($providerId, $name, $region, $withInternetAccess)
324324
{
325325
$this->requestWithErrorHandling('post', '/api/teams/'.Helpers::config('team').'/networks', [
326-
'cloud_provider_id' => $providerId,
327-
'name' => $name,
328-
'region' => $region,
326+
'cloud_provider_id' => $providerId,
327+
'name' => $name,
328+
'region' => $region,
329329
'with_internet_access' => $withInternetAccess,
330330
]);
331331
}
@@ -399,12 +399,12 @@ public function database($databaseId)
399399
public function createDatabase($networkId, $name, $type, $instanceClass, $storage, $public, $pause = false)
400400
{
401401
return $this->requestWithErrorHandling('post', '/api/networks/'.$networkId.'/databases', [
402-
'name' => $name,
403-
'type' => $type,
402+
'name' => $name,
403+
'type' => $type,
404404
'instance_class' => $instanceClass,
405-
'storage' => $storage,
406-
'public' => $public,
407-
'pause' => $pause,
405+
'storage' => $storage,
406+
'public' => $public,
407+
'pause' => $pause,
408408
]);
409409
}
410410

@@ -420,7 +420,7 @@ public function scaleDatabase($databaseId, $instanceClass, $storage)
420420
{
421421
$this->requestWithErrorHandling('put', '/api/databases/'.$databaseId.'/size', [
422422
'instance_class' => $instanceClass,
423-
'storage' => $storage,
423+
'storage' => $storage,
424424
]);
425425
}
426426

@@ -507,7 +507,7 @@ public function rotateDatabasePassword($databaseId)
507507
public function restoreDatabase($databaseId, $name, $restoreTo)
508508
{
509509
return $this->requestWithErrorHandling('post', '/api/restored-databases?database_id='.$databaseId, [
510-
'name' => $name,
510+
'name' => $name,
511511
'restore_to' => $restoreTo,
512512
]);
513513
}
@@ -585,8 +585,8 @@ public function cache($cacheId)
585585
public function createCache($networkId, $name, $type, $instanceClass)
586586
{
587587
return $this->requestWithErrorHandling('post', '/api/networks/'.$networkId.'/caches', [
588-
'name' => $name,
589-
'type' => $type,
588+
'name' => $name,
589+
'type' => $type,
590590
'instance_class' => $instanceClass,
591591
]);
592592
}
@@ -734,9 +734,9 @@ public function requestCertificate($providerId, $domain, array $alternativeNames
734734
{
735735
$this->requestWithErrorHandling('post', '/api/teams/'.Helpers::config('team').'/certificates', [
736736
'cloud_provider_id' => $providerId,
737-
'domain' => $domain,
737+
'domain' => $domain,
738738
'alternative_names' => $alternativeNames,
739-
'region' => $region,
739+
'region' => $region,
740740
'validation_method' => $validationMethod,
741741
]);
742742
}
@@ -1024,12 +1024,12 @@ public function createArtifact(
10241024
$coreVersion = null
10251025
) {
10261026
$artifact = $this->requestWithErrorHandling('post', '/api/projects/'.$projectId.'/artifacts/'.$environment, [
1027-
'uuid' => $uuid,
1028-
'commit' => $commit,
1027+
'uuid' => $uuid,
1028+
'commit' => $commit,
10291029
'commit_message' => $commitMessage,
1030-
'vendor_hash' => $vendorHash,
1031-
'cli_version' => $cliVersion,
1032-
'core_version' => $coreVersion,
1030+
'vendor_hash' => $vendorHash,
1031+
'cli_version' => $cliVersion,
1032+
'core_version' => $coreVersion,
10331033
'uses_container_image' => is_null($file),
10341034
]);
10351035

@@ -1123,8 +1123,8 @@ public function deployment($deploymentId)
11231123
public function validateManifest($projectId, $environment, array $manifest, $cliVersion = null, $coreVersion = null)
11241124
{
11251125
$this->requestWithErrorHandling('post', '/api/projects/'.$projectId.'/environments/'.$environment.'/linted-manifest', [
1126-
'manifest' => $manifest,
1127-
'cli_version' => $cliVersion,
1126+
'manifest' => $manifest,
1127+
'cli_version' => $cliVersion,
11281128
'core_version' => $coreVersion,
11291129
]);
11301130
}
@@ -1450,10 +1450,10 @@ protected function request($method, $uri, array $json = [], $tries = 0)
14501450
protected function requestWithoutErrorHandling($method, $uri, array $json = [])
14511451
{
14521452
return json_decode((string) $this->client()->request($method, ltrim($uri, '/'), [
1453-
'json' => $json,
1453+
'json' => $json,
14541454
'headers' => [
1455-
'Accept' => 'application/json',
1456-
'Content-Type' => 'application/json',
1455+
'Accept' => 'application/json',
1456+
'Content-Type' => 'application/json',
14571457
'Authorization' => 'Bearer '.Helpers::config('token', $_ENV['VAPOR_API_TOKEN'] ?? getenv('VAPOR_API_TOKEN') ?? null),
14581458
],
14591459
])->getBody(), true);

src/DatabaseInstanceClasses.php

+13-13
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ public static function general()
1919
'db.t2.xlarge' => 'db.t2.xlarge - (4 VCPU, 16Gib RAM) - ~$200 / month',
2020
'db.t2.2xlarge' => 'db.t2.2xlarge - (8 VCPU, 32Gib RAM) - ~$400 / month',
2121

22-
'db.t3.micro' => 'db.t3.micro - (2 VCPU, 1Gib RAM) - ~$15 / month',
23-
'db.t3.small' => 'db.t3.small - (2 VCPU, 2Gib RAM) - ~$25 / month',
22+
'db.t3.micro' => 'db.t3.micro - (2 VCPU, 1Gib RAM) - ~$15 / month',
23+
'db.t3.small' => 'db.t3.small - (2 VCPU, 2Gib RAM) - ~$25 / month',
2424
'db.t3.medium' => 'db.t3.medium - (2 VCPU, 4Gib RAM) - ~$50 / month',
25-
'db.t3.large' => 'db.t3.large - (2 VCPU, 8Gib RAM) - ~$100 / month',
25+
'db.t3.large' => 'db.t3.large - (2 VCPU, 8Gib RAM) - ~$100 / month',
2626
'db.t3.xlarge' => 'db.t3.xlarge - (4 VCPU, 16Gib RAM) - ~$200 / month',
2727
'db.t3.2xlarge' => 'db.t3.2xlarge - (8 VCPU, 32Gib RAM) - ~$400 / month',
2828

@@ -33,11 +33,11 @@ public static function general()
3333
'db.t4g.xlarge' => 'db.t4g.xlarge - (4 VCPU, 16Gib RAM) - ~$320 / month',
3434
'db.t4g.2xlarge' => 'db.t4g.2xlarge - (8 VCPU, 32Gib RAM) - ~$640 / month',
3535

36-
'db.m5.large' => 'db.m5.large - (2 VCPU, 8GB RAM) - ~$125 / month',
37-
'db.m5.xlarge' => 'db.m5.xlarge - (4 VCPU, 16Gib RAM) - ~$250 / month',
38-
'db.m5.2xlarge' => 'db.m5.2xlarge - (8 VCPU, 32Gib RAM) - ~$500 / month',
39-
'db.m5.4xlarge' => 'db.m5.4xlarge - (16 VCPU, 64Gib RAM) - ~$1000 / month',
40-
'db.m5.8xlarge' => 'db.m5.8xlarge - (32 VCPU, 128Gib RAM) - ~$2000 / month',
36+
'db.m5.large' => 'db.m5.large - (2 VCPU, 8GB RAM) - ~$125 / month',
37+
'db.m5.xlarge' => 'db.m5.xlarge - (4 VCPU, 16Gib RAM) - ~$250 / month',
38+
'db.m5.2xlarge' => 'db.m5.2xlarge - (8 VCPU, 32Gib RAM) - ~$500 / month',
39+
'db.m5.4xlarge' => 'db.m5.4xlarge - (16 VCPU, 64Gib RAM) - ~$1000 / month',
40+
'db.m5.8xlarge' => 'db.m5.8xlarge - (32 VCPU, 128Gib RAM) - ~$2000 / month',
4141
'db.m5.12xlarge' => 'db.m5.12xlarge - (48 VCPU, 192GiB RAM) - ~$3000 / month',
4242
'db.m5.16xlarge' => 'db.m5.16xlarge - (64 VCPU, 256Gib RAM) - ~$4000 / month',
4343
'db.m5.24xlarge' => 'db.m5.24xlarge - (96 VCPU, 384GiB RAM) - ~$6000 / month',
@@ -52,11 +52,11 @@ public static function general()
5252
public static function memory()
5353
{
5454
return [
55-
'db.r5.large' => 'db.r5.large - (2 VCPU, 16Gib RAM) - ~$173 / month',
56-
'db.r5.xlarge' => 'db.r5.xlarge - (4 VCPU, 32Gib RAM) - ~$346 / month',
57-
'db.r5.2xlarge' => 'db.r5.2xlarge - (8 VCPU, 64Gib RAM) - ~$691 / month',
58-
'db.r5.4xlarge' => 'db.r5.4xlarge - (16 VCPU, 128Gib RAM) - ~$1382 / month',
59-
'db.r5.8xlarge' => 'db.r5.8xlarge - (32 VCPU, 256Gib RAM) - ~$2765 / month',
55+
'db.r5.large' => 'db.r5.large - (2 VCPU, 16Gib RAM) - ~$173 / month',
56+
'db.r5.xlarge' => 'db.r5.xlarge - (4 VCPU, 32Gib RAM) - ~$346 / month',
57+
'db.r5.2xlarge' => 'db.r5.2xlarge - (8 VCPU, 64Gib RAM) - ~$691 / month',
58+
'db.r5.4xlarge' => 'db.r5.4xlarge - (16 VCPU, 128Gib RAM) - ~$1382 / month',
59+
'db.r5.8xlarge' => 'db.r5.8xlarge - (32 VCPU, 256Gib RAM) - ~$2765 / month',
6060
'db.r5.12xlarge' => 'db.r5.12xlarge - (48 VCPU, 384Gib RAM) - ~$4147 / month',
6161
'db.r5.16xlarge' => 'db.r5.16xlarge - (64 VCPU, 512Gib RAM) - ~$5530 / month',
6262
'db.r5.24xlarge' => 'db.r5.24xlarge - (96 VCPU, 768Gib RAM) - ~$8294 / month',

0 commit comments

Comments
 (0)