Skip to content

Commit

Permalink
Merge pull request Sylius#9540 from pamil/1.1-phpstan-fixes
Browse files Browse the repository at this point in the history
PHPStan 0.10 upgrade & road to level 2 checks
  • Loading branch information
pamil authored Jul 3, 2018
2 parents 0c25915 + 20dd531 commit cd8b3e1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Validator/Constraints/ProvinceAddressConstraintValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
use Sylius\Component\Resource\Repository\RepositoryInterface;
use Symfony\Component\Validator\Constraint;
use Symfony\Component\Validator\ConstraintValidator;
use Webmozart\Assert\Assert;

class ProvinceAddressConstraintValidator extends ConstraintValidator
{
Expand Down Expand Up @@ -51,6 +52,9 @@ public function validate($value, Constraint $constraint): void
);
}

/** @var ProvinceAddressConstraint $constraint */
Assert::isInstanceOf($constraint, ProvinceAddressConstraint::class);

$propertyPath = $this->context->getPropertyPath();

foreach (iterator_to_array($this->context->getViolations()) as $violation) {
Expand Down

0 comments on commit cd8b3e1

Please sign in to comment.