Skip to content

Commit

Permalink
fix incompatible method on symfony 7
Browse files Browse the repository at this point in the history
  • Loading branch information
Tetragramat committed Jan 2, 2024
1 parent 57c909c commit d9a0ce6
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use Czechphp\CzechBankAccountBundle\Validator\Constraints\BankAccountNumberValidator;
use PHPUnit\Framework\MockObject\MockObject;
use Symfony\Component\Validator\Constraint;
use Symfony\Component\Validator\ConstraintValidatorInterface;
use Symfony\Component\Validator\Exception\ConstraintDefinitionException;
use Symfony\Component\Validator\Exception\UnexpectedTypeException;
use Symfony\Component\Validator\Test\ConstraintValidatorTestCase;
Expand All @@ -22,7 +23,7 @@ class BankAccountNumberValidatorTest extends ConstraintValidatorTestCase
/**
* @return BankAccountNumberValidator
*/
protected function createValidator()
protected function createValidator(): ConstraintValidatorInterface
{
$this->baseValidator = $this->createMock(ValidatorInterface::class);

Expand Down
3 changes: 2 additions & 1 deletion Tests/Validator/Constraints/BankCodeValidatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use Czechphp\CzechBankAccountBundle\Validator\Constraints\BankCodeValidator;
use PHPUnit\Framework\MockObject\MockObject;
use Symfony\Component\Validator\Constraint;
use Symfony\Component\Validator\ConstraintValidatorInterface;
use Symfony\Component\Validator\Exception\UnexpectedTypeException;
use Symfony\Component\Validator\Test\ConstraintValidatorTestCase;

Expand All @@ -18,7 +19,7 @@ class BankCodeValidatorTest extends ConstraintValidatorTestCase
*/
private $baseValidator;

protected function createValidator()
protected function createValidator(): ConstraintValidatorInterface
{
$this->baseValidator = $this->createMock(ValidatorInterface::class);

Expand Down
3 changes: 2 additions & 1 deletion Tests/Validator/Constraints/ConstantSymbolValidatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use Czechphp\CzechBankAccountBundle\Validator\Constraints\ConstantSymbolValidator;
use PHPUnit\Framework\MockObject\MockObject;
use Symfony\Component\Validator\Constraint;
use Symfony\Component\Validator\ConstraintValidatorInterface;
use Symfony\Component\Validator\Exception\ConstraintDefinitionException;
use Symfony\Component\Validator\Exception\UnexpectedTypeException;
use Symfony\Component\Validator\Test\ConstraintValidatorTestCase;
Expand All @@ -19,7 +20,7 @@ class ConstantSymbolValidatorTest extends ConstraintValidatorTestCase
*/
private $baseValidator;

protected function createValidator()
protected function createValidator(): ConstraintValidatorInterface
{
$this->baseValidator = $this->createMock(ValidatorInterface::class);

Expand Down
3 changes: 2 additions & 1 deletion Tests/Validator/Constraints/SpecificSymbolValidatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use Czechphp\CzechBankAccountBundle\Validator\Constraints\SpecificSymbolValidator;
use PHPUnit\Framework\MockObject\MockObject;
use Symfony\Component\Validator\Constraint;
use Symfony\Component\Validator\ConstraintValidatorInterface;
use Symfony\Component\Validator\Exception\UnexpectedTypeException;
use Symfony\Component\Validator\Test\ConstraintValidatorTestCase;

Expand All @@ -18,7 +19,7 @@ class SpecificSymbolValidatorTest extends ConstraintValidatorTestCase
*/
private $baseValidator;

protected function createValidator()
protected function createValidator(): ConstraintValidatorInterface
{
$this->baseValidator = $this->createMock(ValidatorInterface::class);

Expand Down
3 changes: 2 additions & 1 deletion Tests/Validator/Constraints/VariableSymbolValidatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use Czechphp\CzechBankAccountBundle\Validator\Constraints\VariableSymbolValidator;
use PHPUnit\Framework\MockObject\MockObject;
use Symfony\Component\Validator\Constraint;
use Symfony\Component\Validator\ConstraintValidatorInterface;
use Symfony\Component\Validator\Exception\UnexpectedTypeException;
use Symfony\Component\Validator\Test\ConstraintValidatorTestCase;

Expand All @@ -18,7 +19,7 @@ class VariableSymbolValidatorTest extends ConstraintValidatorTestCase
*/
private $baseValidator;

protected function createValidator()
protected function createValidator(): ConstraintValidatorInterface
{
$this->baseValidator = $this->createMock(ValidatorInterface::class);

Expand Down

0 comments on commit d9a0ce6

Please sign in to comment.