Skip to content

Commit

Permalink
test: add @var for PHPStan
Browse files Browse the repository at this point in the history
 ------ -----------------------------------------------------
  Line   tests/system/Models/FindModelTest.php
 ------ -----------------------------------------------------
  50     Cannot access property $name on array<int, array>.
  51     Cannot access property $email on array<int, array>.
 ------ -----------------------------------------------------
  • Loading branch information
kenjis committed Apr 25, 2024
1 parent de1fbef commit 8427340
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tests/system/Models/FindModelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public function testFindReturnsEntityWithCasts(): void
]);
$id = $this->model->insert($user, true);

/** @var UserWithCasts $user */
$user = $this->model->find($id);

$this->assertSame('John Smith', $user->name);
Expand Down

0 comments on commit 8427340

Please sign in to comment.