Skip to content

Commit

Permalink
Restore fix and suppress phpstan
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Dec 16, 2024
1 parent 7dd5472 commit 487d88e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
6 changes: 6 additions & 0 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,12 @@ parameters:
count: 1
path: src/Db/Adapter/SqliteAdapter.php

-
message: '#^Strict comparison using \!\=\= between Cake\\Database\\StatementInterface and null will always evaluate to true\.$#'
identifier: notIdentical.alwaysTrue
count: 1
path: src/Db/Adapter/SqliteAdapter.php

-
message: '#^PHPDoc tag @return with type Phinx\\Db\\Adapter\\AdapterInterface is not subtype of native type Migrations\\Db\\Adapter\\AdapterInterface\.$#'
identifier: return.phpDocType
Expand Down
5 changes: 4 additions & 1 deletion src/Db/Adapter/SqliteAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,10 @@ protected function resolveTable(string $tableName): array
"SELECT name FROM {$master} WHERE type = 'table' AND lower(name) = ?",
[$table]
);
$rows = $result->fetchAll('assoc');
// null on error
if ($result !== null) {
$rows = $result->fetchAll('assoc');
}
} catch (PDOException $e) {
// an exception can occur if the schema part of the table refers to a database which is not attached
break;
Expand Down

0 comments on commit 487d88e

Please sign in to comment.