public function getConstraintFromAll(\ReflectionProperty $reflectionProperty, $constraintClass)
    {
        /** @var All $allConstraint */
        if (!($allConstraint = $this->getConstraint($reflectionProperty, All::class, false))) {
            return;
        }

        foreach ($allConstraint->constraints as $constraint) {
            if ($constraint instanceof $constraintClass) {
                return $constraint;
            }
        }
    }
public function getConstraintFromAll(\ReflectionProperty $reflectionProperty, $constraintClass)
    {
        /** @var All $allConstraint */
        if (!($allConstraint = $this->getConstraint($reflectionProperty, All::class, false))) {
            return;
        }

        foreach ($allConstraint->constraints as $constraint) {
            if ($constraint instanceof $constraintClass) {
                return $constraint;
            }
        }
    }
public function getConstraintFromAll ( \ ReflectionProperty $ reflectionProperty , $ constraintClass ) { /** @var All $allConstraint */ if ( ! ( $ allConstraint = $ this -> getConstraint ( $ reflectionProperty , All :: class , false ) ) ) { return ; } foreach ( $ allConstraint -> constraints as $ constraint ) { if ( $ constraint instanceof $ constraintClass ) { return $ constraint ; } } }
Retrieve a specific Symfony Constraint from within a Symfony All Constraint.

@param \ReflectionProperty$reflectionProperty
@param string $constraintClass
@return Constraint|null
Retrieve a specific Symfony Constraint from within a Symfony All Constraint .