Skip to content

Commit f846ffd

Browse files
committed
docs: make PHPDoc types more precise
1 parent 1387b24 commit f846ffd

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

phpstan-baseline.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7431,11 +7431,6 @@
74317431
'count' => 1,
74327432
'path' => __DIR__ . '/system/Model.php',
74337433
];
7434-
$ignoreErrors[] = [
7435-
'message' => '#^Property CodeIgniter\\\\Model\\:\\:\\$tempData type has no value type specified in iterable type array\\.$#',
7436-
'count' => 1,
7437-
'path' => __DIR__ . '/system/Model.php',
7438-
];
74397434
$ignoreErrors[] = [
74407435
'message' => '#^Return type \\(array\\|bool\\|float\\|int\\|object\\|string\\|null\\) of method CodeIgniter\\\\Model\\:\\:__call\\(\\) should be covariant with return type \\(\\$this\\(CodeIgniter\\\\BaseModel\\)\\|null\\) of method CodeIgniter\\\\BaseModel\\:\\:__call\\(\\)$#',
74417436
'count' => 1,

system/Model.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
* - allow intermingling calls to the builder
4141
* - removes the need to use Result object directly in most cases
4242
*
43-
* @property BaseConnection $db
43+
* @property-read BaseConnection $db
4444
*
4545
* @method $this groupBy($by, ?bool $escape = null)
4646
* @method $this groupEnd()
@@ -123,7 +123,8 @@ class Model extends BaseModel
123123
* so that we can capture it (not the builder)
124124
* and ensure it gets validated first.
125125
*
126-
* @var array
126+
* @var array{escape: array, data: array}|array{}
127+
* @phpstan-var array{escape: array<int|string, bool|null>, data: row_array}|array{}
127128
*/
128129
protected $tempData = [];
129130

0 commit comments

Comments
 (0)