mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 07:47:22 +01:00
chore: improves type checking
This commit is contained in:
@ -12,6 +12,7 @@ parameters:
|
|||||||
reportUnmatchedIgnoredErrors: true
|
reportUnmatchedIgnoredErrors: true
|
||||||
|
|
||||||
ignoreErrors:
|
ignoreErrors:
|
||||||
|
- '#Cannot instantiate interface PHPUnit\\Util\\Exception#'
|
||||||
- "#with a nullable type declaration#"
|
- "#with a nullable type declaration#"
|
||||||
- "#type mixed is not subtype of native#"
|
- "#type mixed is not subtype of native#"
|
||||||
- "#is not allowed to extend#"
|
- "#is not allowed to extend#"
|
||||||
|
|||||||
@ -161,7 +161,6 @@ final class HigherOrderExpectation
|
|||||||
*/
|
*/
|
||||||
private function getValue(): mixed
|
private function getValue(): mixed
|
||||||
{
|
{
|
||||||
// @phpstan-ignore-next-line
|
|
||||||
return $this->shouldReset ? $this->original->value : $this->expectation->value;
|
return $this->shouldReset ? $this->original->value : $this->expectation->value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -8,9 +8,9 @@ use ParseError;
|
|||||||
use Pest\Concerns;
|
use Pest\Concerns;
|
||||||
use Pest\Contracts\HasPrintableTestCaseName;
|
use Pest\Contracts\HasPrintableTestCaseName;
|
||||||
use Pest\Exceptions\DatasetMissing;
|
use Pest\Exceptions\DatasetMissing;
|
||||||
use Pest\Exceptions\TestDescriptionMissing;
|
|
||||||
use Pest\Exceptions\ShouldNotHappen;
|
use Pest\Exceptions\ShouldNotHappen;
|
||||||
use Pest\Exceptions\TestAlreadyExist;
|
use Pest\Exceptions\TestAlreadyExist;
|
||||||
|
use Pest\Exceptions\TestDescriptionMissing;
|
||||||
use Pest\Factories\Concerns\HigherOrderable;
|
use Pest\Factories\Concerns\HigherOrderable;
|
||||||
use Pest\Plugins\Environment;
|
use Pest\Plugins\Environment;
|
||||||
use Pest\Support\Reflection;
|
use Pest\Support\Reflection;
|
||||||
|
|||||||
@ -524,7 +524,6 @@ final class Expectation
|
|||||||
{
|
{
|
||||||
Assert::assertIsString($this->value, $message);
|
Assert::assertIsString($this->value, $message);
|
||||||
|
|
||||||
// @phpstan-ignore-next-line
|
|
||||||
Assert::assertJson($this->value, $message);
|
Assert::assertJson($this->value, $message);
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
|
|||||||
Reference in New Issue
Block a user