Skip to content

Commit c5e69fc

Browse files
committed
Fix phpcs coding standard violations
Remove unused InvalidArgumentException import from RecordingAdapter, extract assignment out of if condition in PostgresAdapter, and remove blank line before closing brace in ForeignKeyTest.
1 parent 90e0c17 commit c5e69fc

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

src/Db/Adapter/PostgresAdapter.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,8 @@ protected function getChangeColumnInstructions(
505505
'ALTER COLUMN %s',
506506
$quotedColumnName,
507507
);
508-
if ($newColumn->isIdentity() && ($generated = $newColumn->getGenerated()) !== null) {
508+
$generated = $newColumn->getGenerated();
509+
if ($newColumn->isIdentity() && $generated !== null) {
509510
if ($column->isIdentity()) {
510511
$sql .= sprintf(' SET GENERATED %s', $generated);
511512
} else {

src/Db/Adapter/RecordingAdapter.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
use Migrations\Db\Action\AddForeignKey;
1313
use Migrations\Db\Action\AddIndex;
1414
use Migrations\Db\Action\CreateTable;
15-
use InvalidArgumentException;
1615
use Migrations\Db\Action\DropForeignKey;
1716
use Migrations\Db\Action\DropIndex;
1817
use Migrations\Db\Action\DropTable;

tests/TestCase/Db/Table/ForeignKeyTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,5 +151,4 @@ public function testThrowsErrorForInvalidDeferrableValue(): void
151151
$this->expectException(InvalidArgumentException::class);
152152
$this->fk->setDeferrableMode('invalid_value');
153153
}
154-
155154
}

0 commit comments

Comments
 (0)