Matthias\SymfonyServiceDefinitionValidator\ArgumentValidator::validateObjectArgument PHP Метод

validateObjectArgument() приватный Метод

private validateObjectArgument ( $className, $argument, $allowsNull )
    private function validateObjectArgument($className, $argument, $allowsNull)
    {
        if ($argument instanceof Reference) {
            $this->validateReferenceArgument($className, $argument);
        } elseif ($argument instanceof Definition) {
            $this->validateDefinitionArgument($className, $argument);
        } elseif (class_exists('Symfony\\Component\\ExpressionLanguage\\Expression') && $argument instanceof Expression) {
            $this->validateExpressionArgument($className, $argument, $allowsNull);
        } elseif ($argument === null && $allowsNull) {
            return;
        } else {
            throw new TypeHintMismatchException(sprintf('Type-hint "%s" requires this argument to be a reference to a service or an inline service definition', $className));
        }
    }