Skip to content

Commit

Permalink
Merge pull request #2879 from staabm/phpstan
Browse files Browse the repository at this point in the history
Narrow phpstan types in assertInstanceOf* AbstractTestCase methods
  • Loading branch information
kylekatarnls authored Nov 4, 2023
2 parents 77eb7b3 + f0dcc1c commit 93f36e7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/AbstractTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,9 @@ public function assertCarbonTime(CarbonInterface $d, $hour = null, $minute = nul
$this->assertSame($expected, $actual);
}

/**
* @phpstan-assert CarbonInterface $d
*/
public function assertInstanceOfCarbon($d)
{
$this->assertInstanceOf(CarbonInterface::class, $d);
Expand Down Expand Up @@ -229,6 +232,9 @@ public function assertCarbonInterval(CarbonInterval $ci, $years, $months = null,
}
}

/**
* @phpstan-assert CarbonInterval $d
*/
public function assertInstanceOfCarbonInterval($d)
{
$this->assertInstanceOf(CarbonInterval::class, $d);
Expand Down

0 comments on commit 93f36e7

Please sign in to comment.