Skip to content

Commit

Permalink
[TASK] Raise phpstan level to 3, fix a finding
Browse files Browse the repository at this point in the history
  • Loading branch information
extcode committed Oct 16, 2024
1 parent ab78568 commit 7964f81
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Build/phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
includes:
- phpstan-baseline.neon
parameters:
level: 2
level: 3
paths:
- ../Classes
- ../Configuration
Expand Down
6 changes: 5 additions & 1 deletion Tests/Unit/Validation/Validator/EmptyValidatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
use Extcode\Cart\Validation\Validator\EmptyValidator;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Test;
use PHPUnit\Framework\MockObject\MockObject;
use TYPO3\CMS\Extbase\Validation\Validator\ValidatorInterface;
use TYPO3\TestingFramework\Core\Unit\UnitTestCase;

Expand Down Expand Up @@ -39,10 +40,13 @@ protected function validatorOptions(array $options): void

public function setUp(): void
{
$this->validator = $this->getMockBuilder($this->validatorClassName)
/** @var MockObject&EmptyValidator $validator */
$validator = $this->getMockBuilder($this->validatorClassName)
->onlyMethods(['translateErrorMessage'])
->getMock();

$this->validator = $validator;

parent::setUp();
}

Expand Down

0 comments on commit 7964f81

Please sign in to comment.