Skip to content

Commit b1d993b

Browse files
committed
refactor: address review feedback
Signed-off-by: memleakd <121398829+memleakd@users.noreply.github.com>
1 parent df861a7 commit b1d993b

5 files changed

Lines changed: 4 additions & 6 deletions

File tree

system/BaseModel.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,7 @@
4949
* - process various callbacks
5050
* - allow intermingling calls to the db connection
5151
*
52-
* @phpstan-type row_array array<int|string, float|int|null|object|string|bool>
53-
* @psalm-type row_array = array<int|string, float|int|null|object|string|bool>
52+
* @phpstan-type row_array array<int|string, float|int|null|object|string|bool>
5453
* @phpstan-type event_data_beforeinsert array{data: row_array}
5554
* @phpstan-type event_data_afterinsert array{id: int|string, data: row_array, result: bool}
5655
* @phpstan-type event_data_beforefind array{id?: int|string, method: string, singleton: bool, limit?: int, offset?: int}

system/Model.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@
8787
* @phpstan-method $this when($condition, callable(BaseBuilder, mixed): mixed $callback, (callable(BaseBuilder): mixed)|null $defaultCallback = null)
8888
* @phpstan-method $this whenNot($condition, callable(BaseBuilder, mixed): mixed $callback, (callable(BaseBuilder): mixed)|null $defaultCallback = null)
8989
* @phpstan-import-type row_array from BaseModel
90-
* @psalm-import-type row_array from BaseModel
9190
*/
9291
class Model extends BaseModel
9392
{

system/View/Table.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ class Table
8383
/**
8484
* Callback for custom table layout
8585
*
86-
* @var (callable(mixed): mixed)|string|null
86+
* @var (callable(mixed): mixed)|null
8787
*/
8888
public $function;
8989

tests/system/View/TableTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -773,7 +773,7 @@ public function testInvalidCallback(): void
773773
$this->table->setHeading('Name', 'Color', 'Size');
774774
$this->table->addRow('Fred', '<strong>Blue</strong>', 'Small');
775775

776-
$this->table->function = 'ticklemyfancy';
776+
$this->table->function = 'ticklemyfancy'; // @phpstan-ignore assign.propertyType (needed for testing)
777777

778778
$generated = $this->table->generate();
779779

utils/phpstan-baseline/loader.neon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# total 2028 errors
1+
# total 2015 errors
22

33
includes:
44
- argument.type.neon

0 commit comments

Comments
 (0)