protected function getParameter(\ReflectionParameter $parameter)
    {
        if ($parameter->isOptional()) {
            return $parameter->getDefaultValue();
        }

        $type = (string)$parameter->getType();
        return $this->get($type);
    }
protected function getParameter(\ReflectionParameter $parameter)
    {
        if ($parameter->isOptional()) {
            return $parameter->getDefaultValue();
        }

        $type = (string)$parameter->getType();
        return $this->get($type);
    }
protected function getParameter ( \ ReflectionParameter $ parameter ) { if ( $ parameter -> isOptional ( ) ) { return $ parameter -> getDefaultValue ( ) ; } $ type = ( string ) $ parameter -> getType ( ) ; return $ this -> get ( $ type ) ; }
Resolves a parameter for a function call.

@param \ReflectionParameter $parameter
Parameter that needs to be resolved.

@return mixed
The resolved parameter.
Resolves a parameter for a function call .