diff --git a/phpstan.neon b/phpstan.neon index 0a1cba5c..d8b81f41 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -12,6 +12,7 @@ parameters: reportUnmatchedIgnoredErrors: true ignoreErrors: + - '#Cannot instantiate interface PHPUnit\\Util\\Exception#' - "#with a nullable type declaration#" - "#type mixed is not subtype of native#" - "#is not allowed to extend#" diff --git a/src/Expectations/HigherOrderExpectation.php b/src/Expectations/HigherOrderExpectation.php index 2008f582..c7685ace 100644 --- a/src/Expectations/HigherOrderExpectation.php +++ b/src/Expectations/HigherOrderExpectation.php @@ -161,7 +161,6 @@ final class HigherOrderExpectation */ private function getValue(): mixed { - // @phpstan-ignore-next-line return $this->shouldReset ? $this->original->value : $this->expectation->value; } diff --git a/src/Factories/TestCaseFactory.php b/src/Factories/TestCaseFactory.php index a2b32548..4591d9f1 100644 --- a/src/Factories/TestCaseFactory.php +++ b/src/Factories/TestCaseFactory.php @@ -8,9 +8,9 @@ use ParseError; use Pest\Concerns; use Pest\Contracts\HasPrintableTestCaseName; use Pest\Exceptions\DatasetMissing; -use Pest\Exceptions\TestDescriptionMissing; use Pest\Exceptions\ShouldNotHappen; use Pest\Exceptions\TestAlreadyExist; +use Pest\Exceptions\TestDescriptionMissing; use Pest\Factories\Concerns\HigherOrderable; use Pest\Plugins\Environment; use Pest\Support\Reflection; diff --git a/src/Mixins/Expectation.php b/src/Mixins/Expectation.php index 0714d9a3..886ffab2 100644 --- a/src/Mixins/Expectation.php +++ b/src/Mixins/Expectation.php @@ -524,7 +524,6 @@ final class Expectation { Assert::assertIsString($this->value, $message); - // @phpstan-ignore-next-line Assert::assertJson($this->value, $message); return $this;