Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: fix/add @return types in DB Connection #8794

Merged
merged 1 commit into from
Apr 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 0 additions & 25 deletions phpstan-baseline.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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\\<resource,resource\\>\\:\\:\\$escapeChar\\.$#',
'count' => 1,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion system/Database/BaseConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ public function close()
/**
* Platform dependent way method for closing the connection.
*
* @return mixed
* @return void
*/
abstract protected function _close();

Expand Down
2 changes: 2 additions & 0 deletions system/Database/MySQLi/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,8 @@ public function reconnect()

/**
* Close the database connection.
*
* @return void
*/
protected function _close()
{
Expand Down
2 changes: 2 additions & 0 deletions system/Database/Postgre/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ public function reconnect()

/**
* Close the database connection.
*
* @return void
*/
protected function _close()
{
Expand Down
2 changes: 2 additions & 0 deletions system/Database/SQLSRV/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,8 @@ public function reconnect()

/**
* Close the database connection.
*
* @return void
*/
protected function _close()
{
Expand Down
2 changes: 2 additions & 0 deletions system/Database/SQLite3/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ public function reconnect()

/**
* Close the database connection.
*
* @return void
*/
protected function _close()
{
Expand Down
2 changes: 2 additions & 0 deletions system/Test/Mock/MockConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,8 @@ protected function _foreignKeyData(string $table): array

/**
* Close the connection.
*
* @return void
*/
protected function _close()
{
Expand Down
Loading