Skip to content

Commit 984006a

Browse files
committed
fix phpstan
1 parent 1c26761 commit 984006a

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

phpstan-baseline.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15835,12 +15835,6 @@
1583515835
'count' => 1,
1583615836
'path' => __DIR__ . '/tests/system/Models/PaginateModelTest.php',
1583715837
];
15838-
$ignoreErrors[] = [
15839-
// identifier: method.notFound
15840-
'message' => '#^Call to an undefined method class@anonymous/tests/system/Models/SaveModelTest\\.php\\:288\\:\\:truncate\\(\\)\\.$#',
15841-
'count' => 1,
15842-
'path' => __DIR__ . '/tests/system/Models/SaveModelTest.php',
15843-
];
1584415838
$ignoreErrors[] = [
1584515839
// identifier: property.nonObject
1584615840
'message' => '#^Cannot access property \\$description on array\\.$#',

tests/system/Models/SaveModelTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ public function testSaveNewEntityWithDate(): void
301301

302302
$this->setPrivateProperty($testModel, 'useTimestamps', true);
303303
$this->assertTrue($testModel->save($entity));
304-
$testModel->truncate();
304+
$testModel->db->table('empty')->truncate();
305305
}
306306

307307
public function testInvalidAllowedFieldException(): void
@@ -372,7 +372,7 @@ public function testUseAutoIncrementSetToFalseSaveObject(): void
372372
public function testSaveNewEntityWithMappedPrimaryKey(): void
373373
{
374374
$entity = new class () extends Entity {
375-
protected $name;
375+
protected string $name;
376376
protected $attributes = [
377377
'id' => null,
378378
'name' => null,
@@ -403,6 +403,6 @@ public function testSaveNewEntityWithMappedPrimaryKey(): void
403403
$this->assertTrue($testModel->save($entity));
404404

405405
$this->seeInDatabase('empty', ['id' => 1, 'name' => 'Updated']);
406-
$testModel->truncate();
406+
$testModel->db->table('empty')->truncate();
407407
}
408408
}

0 commit comments

Comments
 (0)