diff --git a/phpstan-baseline.php b/phpstan-baseline.php index cfee07815e8a..caaad61d6e84 100644 --- a/phpstan-baseline.php +++ b/phpstan-baseline.php @@ -3001,11 +3001,6 @@ 'count' => 11, 'path' => __DIR__ . '/system/Database/MySQLi/Connection.php', ]; -$ignoreErrors[] = [ - 'message' => '#^Method CodeIgniter\\\\Database\\\\MySQLi\\\\Connection\\:\\:_close\\(\\) should return mixed but return statement is missing\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/system/Database/MySQLi/Connection.php', -]; $ignoreErrors[] = [ 'message' => '#^Only booleans are allowed in &&, int given on the left side\\.$#', 'count' => 1, @@ -3391,11 +3386,6 @@ 'count' => 2, 'path' => __DIR__ . '/system/Database/Postgre/Connection.php', ]; -$ignoreErrors[] = [ - 'message' => '#^Method CodeIgniter\\\\Database\\\\Postgre\\\\Connection\\:\\:_close\\(\\) should return mixed but return statement is missing\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/system/Database/Postgre/Connection.php', -]; $ignoreErrors[] = [ 'message' => '#^Method CodeIgniter\\\\Database\\\\Postgre\\\\Connection\\:\\:buildDSN\\(\\) has no return type specified\\.$#', 'count' => 1, @@ -3756,11 +3746,6 @@ 'count' => 1, 'path' => __DIR__ . '/system/Database/SQLSRV/Connection.php', ]; -$ignoreErrors[] = [ - 'message' => '#^Method CodeIgniter\\\\Database\\\\SQLSRV\\\\Connection\\:\\:_close\\(\\) should return mixed but return statement is missing\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/system/Database/SQLSRV/Connection.php', -]; $ignoreErrors[] = [ 'message' => '#^PHPDoc type string of property CodeIgniter\\\\Database\\\\SQLSRV\\\\Connection\\:\\:\\$escapeChar is not the same as PHPDoc type array\\|string of overridden property CodeIgniter\\\\Database\\\\BaseConnection\\\\:\\:\\$escapeChar\\.$#', 'count' => 1, @@ -3951,11 +3936,6 @@ 'count' => 1, 'path' => __DIR__ . '/system/Database/SQLite3/Connection.php', ]; -$ignoreErrors[] = [ - 'message' => '#^Method CodeIgniter\\\\Database\\\\SQLite3\\\\Connection\\:\\:_close\\(\\) should return mixed but return statement is missing\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/system/Database/SQLite3/Connection.php', -]; $ignoreErrors[] = [ 'message' => '#^Method CodeIgniter\\\\Database\\\\SQLite3\\\\Connection\\:\\:getFieldNames\\(\\) return type has no value type specified in iterable type array\\.$#', 'count' => 1, @@ -8661,11 +8641,6 @@ 'count' => 1, 'path' => __DIR__ . '/system/Test/Mock/MockConnection.php', ]; -$ignoreErrors[] = [ - 'message' => '#^Method CodeIgniter\\\\Test\\\\Mock\\\\MockConnection\\:\\:_close\\(\\) should return mixed but return statement is missing\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/system/Test/Mock/MockConnection.php', -]; $ignoreErrors[] = [ 'message' => '#^Method CodeIgniter\\\\Test\\\\Mock\\\\MockConnection\\:\\:_fieldData\\(\\) return type has no value type specified in iterable type array\\.$#', 'count' => 1, diff --git a/system/Database/BaseConnection.php b/system/Database/BaseConnection.php index b597c6d6cd10..77c9bd39ef3e 100644 --- a/system/Database/BaseConnection.php +++ b/system/Database/BaseConnection.php @@ -479,7 +479,7 @@ public function close() /** * Platform dependent way method for closing the connection. * - * @return mixed + * @return void */ abstract protected function _close(); diff --git a/system/Database/MySQLi/Connection.php b/system/Database/MySQLi/Connection.php index c2ef98adb0b3..b25f2e1af390 100644 --- a/system/Database/MySQLi/Connection.php +++ b/system/Database/MySQLi/Connection.php @@ -246,6 +246,8 @@ public function reconnect() /** * Close the database connection. + * + * @return void */ protected function _close() { diff --git a/system/Database/Postgre/Connection.php b/system/Database/Postgre/Connection.php index bce4209c64d2..126aa98bb1c2 100644 --- a/system/Database/Postgre/Connection.php +++ b/system/Database/Postgre/Connection.php @@ -146,6 +146,8 @@ public function reconnect() /** * Close the database connection. + * + * @return void */ protected function _close() { diff --git a/system/Database/SQLSRV/Connection.php b/system/Database/SQLSRV/Connection.php index 411470d8e34c..0626a63c998b 100755 --- a/system/Database/SQLSRV/Connection.php +++ b/system/Database/SQLSRV/Connection.php @@ -173,6 +173,8 @@ public function reconnect() /** * Close the database connection. + * + * @return void */ protected function _close() { diff --git a/system/Database/SQLite3/Connection.php b/system/Database/SQLite3/Connection.php index d15c64213952..945434184f33 100644 --- a/system/Database/SQLite3/Connection.php +++ b/system/Database/SQLite3/Connection.php @@ -110,6 +110,8 @@ public function reconnect() /** * Close the database connection. + * + * @return void */ protected function _close() { diff --git a/system/Test/Mock/MockConnection.php b/system/Test/Mock/MockConnection.php index 83826c347c98..020d6e3dd340 100644 --- a/system/Test/Mock/MockConnection.php +++ b/system/Test/Mock/MockConnection.php @@ -220,6 +220,8 @@ protected function _foreignKeyData(string $table): array /** * Close the connection. + * + * @return void */ protected function _close() {