chore: phpstan level 5

This commit is contained in:
Nuno Maduro
2021-11-14 21:23:02 +00:00
parent 8ace01b6f1
commit 183f975166
23 changed files with 65 additions and 796 deletions

View File

@ -41,7 +41,6 @@ final class AfterEachRepository
return ChainableClosure::from(function (): void {
if (class_exists(Mockery::class)) {
/* @phpstan-ignore-next-line */
if ($container = Mockery::getContainer()) {
/* @phpstan-ignore-next-line */
$this->addToAssertionCount($container->mockery_getExpectationCount());

View File

@ -90,7 +90,7 @@ final class TestRepository
*/
public function set(TestCaseMethodFactory $method): void
{
if (!isset($this->testCases[$method->filename])) {
if (! array_key_exists($method->filename, $this->testCases)) {
$this->testCases[$method->filename] = new TestCaseFactory($method->filename);
}
@ -102,7 +102,7 @@ final class TestRepository
*/
public function makeIfExists(string $filename): void
{
if (isset($this->testCases[$filename])) {
if (array_key_exists($filename, $this->testCases)) {
$this->make($this->testCases[$filename]);
}
}