Skip to content

Commit

Permalink
fix phpstan
Browse files Browse the repository at this point in the history
  • Loading branch information
michalsn committed Dec 7, 2024
1 parent 1c26761 commit 984006a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
6 changes: 0 additions & 6 deletions phpstan-baseline.php
Original file line number Diff line number Diff line change
Expand Up @@ -15835,12 +15835,6 @@
'count' => 1,
'path' => __DIR__ . '/tests/system/Models/PaginateModelTest.php',
];
$ignoreErrors[] = [
// identifier: method.notFound
'message' => '#^Call to an undefined method class@anonymous/tests/system/Models/SaveModelTest\\.php\\:288\\:\\:truncate\\(\\)\\.$#',
'count' => 1,
'path' => __DIR__ . '/tests/system/Models/SaveModelTest.php',
];
$ignoreErrors[] = [
// identifier: property.nonObject
'message' => '#^Cannot access property \\$description on array\\.$#',
Expand Down
6 changes: 3 additions & 3 deletions tests/system/Models/SaveModelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ public function testSaveNewEntityWithDate(): void

$this->setPrivateProperty($testModel, 'useTimestamps', true);
$this->assertTrue($testModel->save($entity));
$testModel->truncate();
$testModel->db->table('empty')->truncate();
}

public function testInvalidAllowedFieldException(): void
Expand Down Expand Up @@ -372,7 +372,7 @@ public function testUseAutoIncrementSetToFalseSaveObject(): void
public function testSaveNewEntityWithMappedPrimaryKey(): void
{
$entity = new class () extends Entity {
protected $name;
protected string $name;
protected $attributes = [
'id' => null,
'name' => null,
Expand Down Expand Up @@ -403,6 +403,6 @@ public function testSaveNewEntityWithMappedPrimaryKey(): void
$this->assertTrue($testModel->save($entity));

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

0 comments on commit 984006a

Please sign in to comment.