Skip to content

Commit 1a19a03

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

4 files changed

Lines changed: 3 additions & 5 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
@@ -774,7 +774,7 @@ public function testInvalidCallback(): void
774774
$this->table->setHeading('Name', 'Color', 'Size');
775775
$this->table->addRow('Fred', '<strong>Blue</strong>', 'Small');
776776

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

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

0 commit comments

Comments
 (0)