lib/Validator/Structs/ParameterStructValidator.php
private function getRuntimeParameterConstraints(
        ParameterDefinition $parameterDefinition,
        $parameterValue,
        array $allParameterValues
    ): Generator {
        foreach ($parameterDefinition->getConstraints() as $constraint) {
            if ($constraint instanceof Closure) {
                $constraint = $constraint($parameterValue, $allParameterValues, $parameterDefinition);
            }

            if ($constraint instanceof Constraint) {
                yield $constraint;
            }
        }
    }
private function getRuntimeParameterConstraints(
        ParameterDefinition $parameterDefinition,
        $parameterValue,
        array $allParameterValues
    ): Generator {
        foreach ($parameterDefinition->getConstraints() as $constraint) {
            if ($constraint instanceof Closure) {
                $constraint = $constraint($parameterValue, $allParameterValues, $parameterDefinition);
            }

            if ($constraint instanceof Constraint) {
                yield $constraint;
            }
        }
    }
private function getRuntimeParameterConstraints ( ParameterDefinition $ parameterDefinition , $ parameterValue , array $ allParameterValues ) : Generator { foreach ( $ parameterDefinition -> getConstraints ( ) as $ constraint ) { if ( $ constraint instanceof Closure ) { $ constraint = $ constraint ( $ parameterValue , $ allParameterValues , $ parameterDefinition ) ; } if ( $ constraint instanceof Constraint ) { yield $ constraint ; } } }
Returns all constraints applied on a parameter coming from the parameter definition.

@param mixed $parameterValue
Returns all constraints applied on a parameter coming from the parameter definition .