Skip to content

Commit 1501714

Browse files
authored
Merge pull request #828 from cakephp/fix-phpcs
Run latest codesniffer rules
2 parents 236645d + f47870c commit 1501714

54 files changed

Lines changed: 483 additions & 483 deletions

Some content is hidden

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

src/AbstractSeed.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public function call(string $seeder): void
4949
$this->getOutput()->writeln(
5050
' ====' .
5151
' <info>' . $seeder . ':</info>' .
52-
' <comment>seeding</comment>'
52+
' <comment>seeding</comment>',
5353
);
5454

5555
$start = microtime(true);
@@ -60,7 +60,7 @@ public function call(string $seeder): void
6060
' ====' .
6161
' <info>' . $seeder . ':</info>' .
6262
' <comment>seeded' .
63-
' ' . sprintf('%.4fs', $end - $start) . '</comment>'
63+
' ' . sprintf('%.4fs', $end - $start) . '</comment>',
6464
);
6565
$this->getOutput()->writeln('');
6666
}

src/BaseMigration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ public function preFlightCheck(): void
465465
if ($io) {
466466
$io->out(
467467
'<comment>warning</comment> Migration contains both change() and up()/down() methods.' .
468-
' <warning>Ignoring up() and down()</warning>.'
468+
' <warning>Ignoring up() and down()</warning>.',
469469
);
470470
}
471471
}

src/BaseSeed.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ public function call(string $seeder, array $options = []): void
209209
$io->out(
210210
' ====' .
211211
' <info>' . $seeder . ':</info>' .
212-
' <comment>seeding</comment>'
212+
' <comment>seeding</comment>',
213213
);
214214

215215
$start = microtime(true);
@@ -220,7 +220,7 @@ public function call(string $seeder, array $options = []): void
220220
' ====' .
221221
' <info>' . $seeder . ':</info>' .
222222
' <comment>seeded' .
223-
' ' . sprintf('%.4fs', $end - $start) . '</comment>'
223+
' ' . sprintf('%.4fs', $end - $start) . '</comment>',
224224
);
225225
$io->out('');
226226
}

src/CakeAdapter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public function getQueryBuilder(string $type): Query
9393
Query::TYPE_UPDATE => $this->getCakeConnection()->updateQuery(),
9494
Query::TYPE_DELETE => $this->getCakeConnection()->deleteQuery(),
9595
default => throw new InvalidArgumentException(
96-
'Query type must be one of: `select`, `insert`, `update`, `delete`.'
96+
'Query type must be one of: `select`, `insert`, `update`, `delete`.',
9797
)
9898
};
9999
}

src/CakeManager.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -141,14 +141,14 @@ public function migrateToDateTime(string $environment, DateTime $dateTime, bool
141141

142142
if ($versionToMigrate === null) {
143143
$this->getOutput()->writeln(
144-
'No migrations to run'
144+
'No migrations to run',
145145
);
146146

147147
return;
148148
}
149149

150150
$this->getOutput()->writeln(
151-
'Migrating to version ' . $versionToMigrate
151+
'Migrating to version ' . $versionToMigrate,
152152
);
153153
$this->migrate($environment, $versionToMigrate, $fake);
154154
}
@@ -220,7 +220,7 @@ public function markMigrated(int $version, string $path): bool
220220

221221
if (!$migrationFile) {
222222
throw new RuntimeException(
223-
sprintf('A migration file matching version number `%s` could not be found', $version)
223+
sprintf('A migration file matching version number `%s` could not be found', $version),
224224
);
225225
}
226226

@@ -309,16 +309,16 @@ public function markVersionsAsMigrated(string $path, array $versions, OutputInte
309309
try {
310310
$this->markMigrated($version, $path);
311311
$output->writeln(
312-
sprintf('<info>Migration `%s` successfully marked migrated !</info>', $version)
312+
sprintf('<info>Migration `%s` successfully marked migrated !</info>', $version),
313313
);
314314
} catch (Exception $e) {
315315
$adapter->rollbackTransaction();
316316
$output->writeln(
317317
sprintf(
318318
'<error>An error occurred while marking migration `%s` as migrated : %s</error>',
319319
$version,
320-
$e->getMessage()
321-
)
320+
$e->getMessage(),
321+
),
322322
);
323323
$output->writeln('<error>All marked migrations during this process were unmarked.</error>');
324324

src/Command/BakeMigrationDiffCommand.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ protected function getColumns(): void
274274
$column['collate'],
275275
$column['fixed'],
276276
$oldColumn['collate'],
277-
$oldColumn['fixed']
277+
$oldColumn['fixed'],
278278
);
279279

280280
if (
@@ -447,7 +447,7 @@ protected function getIndexes(): void
447447
}
448448
$this->templateData[$table]['indexes']['remove'] = array_merge(
449449
$this->templateData[$table]['indexes']['remove'],
450-
$parts
450+
$parts,
451451
);
452452
}
453453
}
@@ -590,7 +590,7 @@ public function getOptionParser(): ConsoleOptionParser
590590
$parser->setDescription(
591591
'Create a migration that captures the difference between ' .
592592
'the migration state is expected to be and what the schema ' .
593-
'reflection contains.'
593+
'reflection contains.',
594594
)->addArgument('name', [
595595
'help' => 'Name of the migration to bake. Can use Plugin.name to bake migration files into plugins.',
596596
'required' => true,

src/Command/BakeMigrationSnapshotCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ public function getOptionParser(): ConsoleOptionParser
159159
"Bake migration snapshot class\n" .
160160
"\n" .
161161
'Migration snapshots capture the current schema of an application into a ' .
162-
'migration that will reproduce the current state as accurately as possible.'
162+
'migration that will reproduce the current state as accurately as possible.',
163163
)->addArgument('name', [
164164
'help' => 'Name of the migration to bake. Can use Plugin.name to bake migration files into plugins.',
165165
'required' => true,

src/Command/BakeSeedCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ public function bake(string $name, Arguments $args, ConsoleIo $io): void
156156
$newArgs = new Arguments(
157157
$args->getArguments(),
158158
$options,
159-
['name']
159+
['name'],
160160
);
161161
$this->_name = $name;
162162
parent::bake($name, $newArgs, $io);
@@ -173,7 +173,7 @@ public function buildOptionParser(ConsoleOptionParser $parser): ConsoleOptionPar
173173
$parser = parent::buildOptionParser($parser);
174174

175175
$parser->setDescription(
176-
'Bake seed class.'
176+
'Bake seed class.',
177177
)->addOption('table', [
178178
'help' => 'The database table to use.',
179179
])->addOption('data', [

src/Command/BakeSimpleMigrationCommand.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,8 @@ public function bake(string $name, Arguments $args, ConsoleIo $io): void
142142
$io->abort(
143143
sprintf(
144144
'A migration with the name `%s` already exists. Please use a different name.',
145-
$name
146-
)
145+
$name,
146+
),
147147
);
148148
}
149149

@@ -220,7 +220,7 @@ public function buildOptionParser(ConsoleOptionParser $parser): ConsoleOptionPar
220220
$parser = $this->_setCommonOptions($parser);
221221

222222
$parser->setDescription(
223-
'Bake migration class.'
223+
'Bake migration class.',
224224
)->addOption('no-test', [
225225
'boolean' => true,
226226
'help' => 'Do not generate a test skeleton.',

src/Command/EntryCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public function run(array $argv, ConsoleIo $io): ?int
7272
$args = new Arguments(
7373
$arguments,
7474
$options,
75-
$parser->argumentNames()
75+
$parser->argumentNames(),
7676
);
7777
} catch (ConsoleException $e) {
7878
$io->err('Error: ' . $e->getMessage());
@@ -114,7 +114,7 @@ public function execute(Arguments $args, ConsoleIo $io): ?int
114114
$name = $args->getArgumentAt(0);
115115
$io->err(
116116
"<error>Could not find migrations command named `$name`."
117-
. ' Run `migrations --help` to get a list of commands.</error>'
117+
. ' Run `migrations --help` to get a list of commands.</error>',
118118
);
119119

120120
return static::CODE_ERROR;

0 commit comments

Comments
 (0)