Skip to content

Commit 0f6bf72

Browse files
committed
Fix CS.
1 parent 6dcde63 commit 0f6bf72

38 files changed

+150
-162
lines changed

src/CodeGen/CodeParser.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public function parseFile(string $code): ?ParsedFile
9595
$this->parsed['imports']['class'],
9696
$this->parsed['imports']['function'],
9797
$this->parsed['imports']['const'],
98-
$this->parsed['class']
98+
$this->parsed['class'],
9999
);
100100
}
101101

@@ -201,7 +201,7 @@ public function enterNode(Node $node)
201201
$implements,
202202
$constants,
203203
$properties,
204-
$methods
204+
$methods,
205205
);
206206

207207
return NodeVisitor::DONT_TRAVERSE_CHILDREN;

src/CodeGen/FileBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function __construct(ConsoleIo $io, string $namespace, ?ParsedFile $parse
5151
throw new ParseException(sprintf(
5252
'Existing namespace `%s` does not match expected namespace `%s`, cannot update existing file',
5353
$parsedFile->namespace,
54-
$namespace
54+
$namespace,
5555
));
5656
}
5757

src/CodeGen/ImportHelper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public static function merge(array $existing, array $imports, ?ConsoleIo $io = n
6161
if ($io) {
6262
$io->warning(sprintf(
6363
'Import `%s` conflicts with existing import, discarding.',
64-
$class
64+
$class,
6565
));
6666
}
6767
continue;
@@ -72,7 +72,7 @@ public static function merge(array $existing, array $imports, ?ConsoleIo $io = n
7272
if ($io) {
7373
$io->warning(sprintf(
7474
'Import `%s` conflicts with existing import, discarding.',
75-
$class
75+
$class,
7676
));
7777
}
7878
continue;

src/CodeGen/ParsedFile.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function __construct(
5858
array $classImports,
5959
array $functionImports,
6060
array $constImports,
61-
ParsedClass $class
61+
ParsedClass $class,
6262
) {
6363
$this->namespace = $namespace;
6464
$this->classImports = $classImports;

src/Command/BakeCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ public function getTemplatePath(Arguments $args, ?string $container = null): str
138138
if (empty($paths)) {
139139
throw new InvalidArgumentException(
140140
'Could not read template paths. ' .
141-
'Ensure `App.paths.templates` is defined in your application configuration.'
141+
'Ensure `App.paths.templates` is defined in your application configuration.',
142142
);
143143
}
144144
$path = $paths[0];
@@ -231,7 +231,7 @@ protected function writeFile(
231231
string $path,
232232
string $contents,
233233
bool $forceOverwrite = false,
234-
bool $skipIfUnchanged = true
234+
bool $skipIfUnchanged = true,
235235
): bool {
236236
if ($skipIfUnchanged && file_exists($path) && file_get_contents($path) === $contents) {
237237
$io->info("Skipping update to `{$path}`. It already exists and would not change.");

src/Command/CommandCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public function templateData(Arguments $arguments): array
6969
$data['command_name'] = Inflector::underscore(str_replace(
7070
'.',
7171
' ',
72-
$arguments->getArgument('name')
72+
$arguments->getArgument('name'),
7373
));
7474

7575
return $data;

src/Command/ControllerCommand.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ public function bake(string $controllerName, Arguments $args, ConsoleIo $io): vo
150150
'pluralName',
151151
'prefix',
152152
'singularHumanName',
153-
'singularName'
153+
'singularName',
154154
);
155155
$data['name'] = $controllerName;
156156

@@ -206,7 +206,7 @@ public function bakeTest(string $className, Arguments $args, ConsoleIo $io): voi
206206
$testArgs = new Arguments(
207207
['controller', $className],
208208
$args->getOptions(),
209-
['type', 'name']
209+
['type', 'name'],
210210
);
211211
$test->execute($testArgs, $io);
212212
}
@@ -259,7 +259,7 @@ public function buildOptionParser(ConsoleOptionParser $parser): ConsoleOptionPar
259259
{
260260
$parser = $this->_setCommonOptions($parser);
261261
$parser->setDescription(
262-
'Bake a controller skeleton.'
262+
'Bake a controller skeleton.',
263263
)->addArgument('name', [
264264
'help' => 'Name of the controller to bake (without the `Controller` suffix). ' .
265265
'You can use Plugin.name to bake controllers into plugins.',

src/Command/EntryCommand.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public function run(array $argv, ConsoleIo $io): ?int
7979
$args = new Arguments(
8080
$arguments,
8181
$options,
82-
$parser->argumentNames()
82+
$parser->argumentNames(),
8383
);
8484
} catch (ConsoleException $e) {
8585
$io->err('Error: ' . $e->getMessage());
@@ -111,7 +111,7 @@ public function execute(Arguments $args, ConsoleIo $io): ?int
111111
$name = $args->getArgumentAt(0);
112112
$io->err(
113113
"<error>Could not find bake command named `$name`."
114-
. ' Run `bake --help` to get a list of commands.</error>'
114+
. ' Run `bake --help` to get a list of commands.</error>',
115115
);
116116

117117
return static::CODE_ERROR;
@@ -136,7 +136,7 @@ public function buildOptionParser(ConsoleOptionParser $parser): ConsoleOptionPar
136136
->setDescription(
137137
'Bake generates code for your application. Different types of classes can be generated' .
138138
' with the subcommands listed below. For example run <info>bake controller --help</info>' .
139-
' to learn more about generating a controller.'
139+
' to learn more about generating a controller.',
140140
);
141141
$commands = [];
142142
foreach ($this->commands as $command => $class) {

src/Command/EnumCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public function buildOptionParser(ConsoleOptionParser $parser): ConsoleOptionPar
9797
$parser = $this->_setCommonOptions($parser);
9898

9999
$parser->setDescription(
100-
'Bake backed enums for use in models.'
100+
'Bake backed enums for use in models.',
101101
)->addArgument('name', [
102102
'help' => 'Name of the enum to bake. You can use Plugin.name to bake plugin enums.',
103103
'required' => true,

src/Command/FixtureAllCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public function buildOptionParser(ConsoleOptionParser $parser): ConsoleOptionPar
4949
$parser = $this->_setCommonOptions($parser);
5050

5151
$parser = $parser->setDescription(
52-
'Generate all fixtures for use with the test suite.'
52+
'Generate all fixtures for use with the test suite.',
5353
)->addOption('count', [
5454
'help' => 'When using generated data, the number of records to include in the fixture(s).',
5555
'short' => 'n',

0 commit comments

Comments
 (0)