From c3c170e644d1812b788a1d9eef61adaf1e9d6371 Mon Sep 17 00:00:00 2001 From: kenjis Date: Sat, 30 Sep 2023 09:28:52 +0900 Subject: [PATCH] refactor: if condition --- phpstan-baseline.php | 5 ----- system/Database/OCI8/Connection.php | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/phpstan-baseline.php b/phpstan-baseline.php index 8a3e75dfb0ce..50fb6aa285ef 100644 --- a/phpstan-baseline.php +++ b/phpstan-baseline.php @@ -1466,11 +1466,6 @@ 'count' => 1, 'path' => __DIR__ . '/system/Database/OCI8/Connection.php', ]; -$ignoreErrors[] = [ - 'message' => '#^Only booleans are allowed in a negated boolean, array\\|string given\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/system/Database/OCI8/Connection.php', -]; $ignoreErrors[] = [ 'message' => '#^PHPDoc type string of property CodeIgniter\\\\Database\\\\OCI8\\\\Connection\\:\\:\\$escapeChar is not the same as PHPDoc type array\\|string of overridden property CodeIgniter\\\\Database\\\\BaseConnection\\\\:\\:\\$escapeChar\\.$#', 'count' => 1, diff --git a/system/Database/OCI8/Connection.php b/system/Database/OCI8/Connection.php index dd54bf9d4a11..8cb7e3a4a766 100644 --- a/system/Database/OCI8/Connection.php +++ b/system/Database/OCI8/Connection.php @@ -602,7 +602,7 @@ public function insertID(): int } } - if (! $primaryColumnName) { + if ($primaryColumnName === '') { return 0; }