Skip to content

Commit b815163

Browse files
authored
Fix CS (#2349)
1 parent a6fe385 commit b815163

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+467
-467
lines changed

src/Phinx/Config/Config.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public static function fromYaml(string $configFilePath): ConfigInterface
8282
if (!is_array($configArray)) {
8383
throw new RuntimeException(sprintf(
8484
'File \'%s\' must be valid YAML',
85-
$configFilePath
85+
$configFilePath,
8686
));
8787
}
8888

@@ -108,7 +108,7 @@ public static function fromJson(string $configFilePath): ConfigInterface
108108
if (!is_array($configArray)) {
109109
throw new RuntimeException(sprintf(
110110
'File \'%s\' must be valid JSON',
111-
$configFilePath
111+
$configFilePath,
112112
));
113113
}
114114

@@ -134,7 +134,7 @@ public static function fromPhp(string $configFilePath): ConfigInterface
134134
if (!is_array($configArray)) {
135135
throw new RuntimeException(sprintf(
136136
'PHP file \'%s\' must return an array',
137-
$configFilePath
137+
$configFilePath,
138138
));
139139
}
140140

@@ -212,7 +212,7 @@ public function getDefaultEnvironment(): string
212212

213213
throw new RuntimeException(sprintf(
214214
'The environment configuration (read from $PHINX_ENVIRONMENT) for \'%s\' is missing',
215-
$env
215+
$env,
216216
));
217217
}
218218

@@ -231,7 +231,7 @@ public function getDefaultEnvironment(): string
231231

232232
throw new RuntimeException(sprintf(
233233
'The environment configuration for \'%s\' is missing',
234-
$this->values['environments']['default_environment']
234+
$this->values['environments']['default_environment'],
235235
));
236236
}
237237

src/Phinx/Console/Command/AbstractCommand.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -371,14 +371,14 @@ protected function verifyMigrationDirectory(string $path): void
371371
if (!is_dir($path)) {
372372
throw new InvalidArgumentException(sprintf(
373373
'Migration directory "%s" does not exist',
374-
$path
374+
$path,
375375
));
376376
}
377377

378378
if (!is_writable($path)) {
379379
throw new InvalidArgumentException(sprintf(
380380
'Migration directory "%s" is not writable',
381-
$path
381+
$path,
382382
));
383383
}
384384
}
@@ -395,14 +395,14 @@ protected function verifySeedDirectory(string $path): void
395395
if (!is_dir($path)) {
396396
throw new InvalidArgumentException(sprintf(
397397
'Seed directory "%s" does not exist',
398-
$path
398+
$path,
399399
));
400400
}
401401

402402
if (!is_writable($path)) {
403403
throw new InvalidArgumentException(sprintf(
404404
'Seed directory "%s" is not writable',
405-
$path
405+
$path,
406406
));
407407
}
408408
}

src/Phinx/Console/Command/Breakpoint.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ protected function configure(): void
4848
<info>phinx breakpoint -e development</info>
4949
<info>phinx breakpoint -e development -t 20110103081132</info>
5050
<info>phinx breakpoint -e development -r</info>
51-
EOT
51+
EOT,
5252
);
5353
}
5454

src/Phinx/Console/Command/Create.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ protected function configure(): void
5959
->setHelp(sprintf(
6060
'%sCreates a new database migration%s',
6161
PHP_EOL,
62-
PHP_EOL
62+
PHP_EOL,
6363
));
6464

6565
// An alternative template.
@@ -127,7 +127,7 @@ protected function getMigrationPath(InputInterface $input, OutputInterface $outp
127127
throw new Exception(
128128
'You probably used curly braces to define migration path in your Phinx configuration file, ' .
129129
'but no directories have been matched using this pattern. ' .
130-
'You need to create a migration directory manually.'
130+
'You need to create a migration directory manually.',
131131
);
132132
}
133133

@@ -179,7 +179,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
179179
if ($className !== null && in_array(strtolower($className), $this->keywords)) {
180180
throw new InvalidArgumentException(sprintf(
181181
'The migration class name "%s" is a reserved PHP keyword. Please choose a different class name.',
182-
$className
182+
$className,
183183
));
184184
}
185185

@@ -195,7 +195,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
195195
if (!Util::isValidPhinxClassName($className)) {
196196
throw new InvalidArgumentException(sprintf(
197197
'The migration class name "%s" is invalid. Please use CamelCase format.',
198-
$className
198+
$className,
199199
));
200200
}
201201

@@ -207,7 +207,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
207207
throw new InvalidArgumentException(sprintf(
208208
'The migration class name "%s%s" already exists',
209209
$namespace ? $namespace . '\\' : '',
210-
$className
210+
$className,
211211
));
212212
}
213213

@@ -216,7 +216,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
216216
if (is_file($filePath)) {
217217
throw new InvalidArgumentException(sprintf(
218218
'The file "%s" already exists',
219-
$filePath
219+
$filePath,
220220
));
221221
}
222222

@@ -253,7 +253,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
253253
if ($altTemplate && !is_file($altTemplate)) {
254254
throw new InvalidArgumentException(sprintf(
255255
'The alternative template file "%s" does not exist',
256-
$altTemplate
256+
$altTemplate,
257257
));
258258
}
259259

@@ -267,12 +267,12 @@ protected function execute(InputInterface $input, OutputInterface $output): int
267267
throw new InvalidArgumentException(sprintf(
268268
'The class "%s" via the alias "%s" does not exist',
269269
$aliasedClassName,
270-
$creationClassName
270+
$creationClassName,
271271
));
272272
} elseif (!$aliasedClassName) {
273273
throw new InvalidArgumentException(sprintf(
274274
'The class "%s" does not exist',
275-
$creationClassName
275+
$creationClassName,
276276
));
277277
}
278278
}
@@ -282,14 +282,14 @@ protected function execute(InputInterface $input, OutputInterface $output): int
282282
throw new InvalidArgumentException(sprintf(
283283
'The class "%s" does not implement the required interface "%s"',
284284
$creationClassName,
285-
self::CREATION_INTERFACE
285+
self::CREATION_INTERFACE,
286286
));
287287
} elseif ($aliasedClassName && !is_subclass_of($aliasedClassName, self::CREATION_INTERFACE)) {
288288
throw new InvalidArgumentException(sprintf(
289289
'The class "%s" via the alias "%s" does not implement the required interface "%s"',
290290
$aliasedClassName,
291291
$creationClassName,
292-
self::CREATION_INTERFACE
292+
self::CREATION_INTERFACE,
293293
));
294294
}
295295
}
@@ -321,7 +321,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
321321
if (file_put_contents($filePath, $contents) === false) {
322322
throw new RuntimeException(sprintf(
323323
'The file "%s" could not be written to',
324-
$path
324+
$path,
325325
));
326326
}
327327

src/Phinx/Console/Command/Init.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,13 @@ protected function configure(): void
5050
'-f',
5151
InputArgument::OPTIONAL,
5252
'What format should we use to initialize?',
53-
AbstractCommand::FORMAT_DEFAULT
53+
AbstractCommand::FORMAT_DEFAULT,
5454
)
5555
->addArgument('path', InputArgument::OPTIONAL, 'Which path should we initialize for Phinx?')
5656
->setHelp(sprintf(
5757
'%sInitializes the application for Phinx%s',
5858
PHP_EOL,
59-
PHP_EOL
59+
PHP_EOL,
6060
));
6161
}
6262

@@ -94,7 +94,7 @@ protected function resolvePath(InputInterface $input, string $format): string
9494
if (!in_array($format, static::$supportedFormats, true)) {
9595
throw new InvalidArgumentException(sprintf(
9696
'Invalid format "%s". Format must be either ' . implode(', ', static::$supportedFormats) . '.',
97-
$format
97+
$format,
9898
));
9999
}
100100

@@ -118,14 +118,14 @@ protected function resolvePath(InputInterface $input, string $format): string
118118
if (is_file($path)) {
119119
throw new InvalidArgumentException(sprintf(
120120
'Config file "%s" already exists.',
121-
$path
121+
$path,
122122
));
123123
}
124124

125125
// Dir is invalid
126126
throw new InvalidArgumentException(sprintf(
127127
'Invalid path "%s" for config file.',
128-
$path
128+
$path,
129129
));
130130
}
131131

@@ -145,7 +145,7 @@ protected function writeConfig(string $path, string $format = AbstractCommand::F
145145
if (!is_writable($dirname)) {
146146
throw new InvalidArgumentException(sprintf(
147147
'The directory "%s" is not writable',
148-
$dirname
148+
$dirname,
149149
));
150150
}
151151

@@ -159,14 +159,14 @@ protected function writeConfig(string $path, string $format = AbstractCommand::F
159159
} else {
160160
throw new RuntimeException(sprintf(
161161
'Could not find template for format "%s".',
162-
$format
162+
$format,
163163
));
164164
}
165165

166166
if (file_put_contents($path, $contents) === false) {
167167
throw new RuntimeException(sprintf(
168168
'The file "%s" could not be written to',
169-
$path
169+
$path,
170170
));
171171
}
172172
}

src/Phinx/Console/Command/ListAliases.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,17 +63,17 @@ function ($alias, $class) use ($maxAliasLength, $maxClassLength) {
6363
return sprintf('%s %s', str_pad($alias, $maxAliasLength), str_pad($class, $maxClassLength));
6464
},
6565
array_keys($aliases),
66-
$aliases
67-
)
66+
$aliases,
67+
),
6868
),
69-
$this->verbosityLevel
69+
$this->verbosityLevel,
7070
);
7171
} else {
7272
$output->writeln(
7373
'<comment>warning</comment> no aliases defined in ' . Util::relativePath(
74-
$this->config->getConfigFilePath()
74+
$this->config->getConfigFilePath(),
7575
),
76-
$this->verbosityLevel
76+
$this->verbosityLevel,
7777
);
7878
}
7979

src/Phinx/Console/Command/Migrate.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ protected function configure(): void
4949
<info>phinx migrate -e development -d 20110103</info>
5050
<info>phinx migrate -e development -v</info>
5151
52-
EOT
52+
EOT,
5353
);
5454
}
5555

src/Phinx/Console/Command/Rollback.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ protected function configure(): void
5858
This can be used to allow the rolling back of the last executed migration instead of the last created one, or combined
5959
with the <info>-d|--date</info> option to rollback to a certain date using the migration start times to order them.
6060
61-
EOT
61+
EOT,
6262
);
6363
}
6464

src/Phinx/Console/Command/SeedCreate.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ protected function configure(): void
4545
->setHelp(sprintf(
4646
'%sCreates a new database seeder%s',
4747
PHP_EOL,
48-
PHP_EOL
48+
PHP_EOL,
4949
));
5050

5151
// An alternative template.
@@ -104,7 +104,7 @@ protected function getSeedPath(InputInterface $input, OutputInterface $output):
104104
throw new Exception(
105105
'You probably used curly braces to define seed path in your Phinx configuration file, ' .
106106
'but no directories have been matched using this pattern. ' .
107-
'You need to create a seed directory manually.'
107+
'You need to create a seed directory manually.',
108108
);
109109
}
110110

@@ -155,7 +155,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
155155
if (!Util::isValidPhinxClassName($className)) {
156156
throw new InvalidArgumentException(sprintf(
157157
'The seed class name "%s" is invalid. Please use CamelCase format',
158-
$className
158+
$className,
159159
));
160160
}
161161

@@ -165,7 +165,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
165165
if (is_file($filePath)) {
166166
throw new InvalidArgumentException(sprintf(
167167
'The file "%s" already exists',
168-
basename($filePath)
168+
basename($filePath),
169169
));
170170
}
171171

@@ -176,7 +176,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
176176
if ($altTemplate && !is_file($altTemplate)) {
177177
throw new InvalidArgumentException(sprintf(
178178
'The template file "%s" does not exist',
179-
$altTemplate
179+
$altTemplate,
180180
));
181181
}
182182

@@ -187,7 +187,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
187187
if (!is_null($altTemplate) && !is_file($altTemplate)) {
188188
throw new InvalidArgumentException(sprintf(
189189
'The template file `%s` from config does not exist',
190-
$altTemplate
190+
$altTemplate,
191191
));
192192
}
193193
}
@@ -209,7 +209,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
209209
if (file_put_contents($filePath, $contents) === false) {
210210
throw new RuntimeException(sprintf(
211211
'The file "%s" could not be written to',
212-
$path
212+
$path,
213213
));
214214
}
215215

src/Phinx/Console/Command/SeedRun.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ protected function configure(): void
4545
<info>phinx seed:run -e development -s UserSeeder -s PermissionSeeder -s LogSeeder</info>
4646
<info>phinx seed:run -e development -v</info>
4747
48-
EOT
48+
EOT,
4949
);
5050
}
5151

0 commit comments

Comments
 (0)