Skip to content
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
5 changes: 0 additions & 5 deletions phpstan-baseline.php
Original file line number Diff line number Diff line change
Expand Up @@ -2641,11 +2641,6 @@
'count' => 1,
'path' => __DIR__ . '/system/Model.php',
];
$ignoreErrors[] = [
'message' => '#^Return type \\(int\\|object\\|string\\|false\\) of method CodeIgniter\\\\Model\\:\\:insert\\(\\) should be covariant with return type \\(bool\\|int\\|string\\) of method CodeIgniter\\\\BaseModel\\:\\:insert\\(\\)$#',
'count' => 1,
'path' => __DIR__ . '/system/Model.php',
];
$ignoreErrors[] = [
'message' => '#^Accessing offset mixed directly on \\$_GET is discouraged\\.$#',
'count' => 1,
Expand Down
6 changes: 4 additions & 2 deletions system/BaseModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -740,10 +740,12 @@ public function getInsertID()
* Inserts data into the database. If an object is provided,
* it will attempt to convert it to an array.
*
* @param array|object|null $data Data
* @param bool $returnID Whether insert ID should be returned or not.
* @param array|object|null $data Data
* @phpstan-param row_array|object|null $data
* @param bool $returnID Whether insert ID should be returned or not.
*
* @return bool|int|string insert ID or true on success. false on failure.
* @phpstan-return ($returnID is true ? int|string|false : bool)
*
* @throws ReflectionException
*/
Expand Down
6 changes: 4 additions & 2 deletions system/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -697,9 +697,11 @@ protected function shouldUpdate($data): bool
* it will attempt to convert it to an array.
*
* @param array|object|null $data
* @param bool $returnID Whether insert ID should be returned or not.
* @phpstan-param row_array|object|null $data
* @param bool $returnID Whether insert ID should be returned or not.
*
* @return BaseResult|false|int|object|string
* @return false|int|object|string
* @phpstan-return ($returnID is true ? int|string|false : bool)
*
* @throws ReflectionException
*/
Expand Down