private function completeArgumentTypeFromTypeHint(Argument $arg, ReflectionMethod $method, ReflectionParameter $param, DocBlockReader $docBlock): void
    {
        if (!$arg->getTypeInstance()) {
            $typeDeclaration = $docBlock->getParameterType($param);
            $this->throwIfArray($param, $typeDeclaration);
            $arg->setTypeInstance($this->getTypeFromPhpDeclaration($method, $typeDeclaration, true));
        }

        $type = $param->getType();
        if (!$arg->getTypeInstance() && $type) {
            $this->throwIfArray($param, (string) $type);
            $arg->setTypeInstance($this->reflectionTypeToType($type, true));
        }

        $this->nonNullIfHasDefault($arg);

        $this->throwIfNotInputType($param, $arg);
    }
private function completeArgumentTypeFromTypeHint(Argument $arg, ReflectionMethod $method, ReflectionParameter $param, DocBlockReader $docBlock): void
    {
        if (!$arg->getTypeInstance()) {
            $typeDeclaration = $docBlock->getParameterType($param);
            $this->throwIfArray($param, $typeDeclaration);
            $arg->setTypeInstance($this->getTypeFromPhpDeclaration($method, $typeDeclaration, true));
        }

        $type = $param->getType();
        if (!$arg->getTypeInstance() && $type) {
            $this->throwIfArray($param, (string) $type);
            $arg->setTypeInstance($this->reflectionTypeToType($type, true));
        }

        $this->nonNullIfHasDefault($arg);

        $this->throwIfNotInputType($param, $arg);
    }
private function completeArgumentTypeFromTypeHint ( Argument $ arg , ReflectionMethod $ method , ReflectionParameter $ param , DocBlockReader $ docBlock ) : void { if ( ! $ arg -> getTypeInstance ( ) ) { $ typeDeclaration = $ docBlock -> getParameterType ( $ param ) ; $ this -> throwIfArray ( $ param , $ typeDeclaration ) ; $ arg -> setTypeInstance ( $ this -> getTypeFromPhpDeclaration ( $ method , $ typeDeclaration , true ) ) ; } $ type = $ param -> getType ( ) ; if ( ! $ arg -> getTypeInstance ( ) && $ type ) { $ this -> throwIfArray ( $ param , ( string ) $ type ) ; $ arg -> setTypeInstance ( $ this -> reflectionTypeToType ( $ type , true ) ) ; } $ this -> nonNullIfHasDefault ( $ arg ) ; $ this -> throwIfNotInputType ( $ param , $ arg ) ; }
Complete a single argument type from its type hint and doc block

@param Argument $arg
@param ReflectionMethod $method
@param ReflectionParameter $param
@param DocBlockReader $docBlock
Complete a single argument type from its type hint and doc block