protected function resolvePrimitive(ReflectionParameter $parameter)
    {
        if (! is_null($concrete = $this->getContextualConcrete('$'.$parameter->name))) {
            return $concrete instanceof Closure ? $concrete($this) : $concrete;
        }

        if ($parameter->isDefaultValueAvailable()) {
            return $parameter->getDefaultValue();
        }

        $this->unresolvablePrimitive($parameter);
    }
protected function resolvePrimitive(ReflectionParameter $parameter)
    {
        if (! is_null($concrete = $this->getContextualConcrete('$'.$parameter->name))) {
            return $concrete instanceof Closure ? $concrete($this) : $concrete;
        }

        if ($parameter->isDefaultValueAvailable()) {
            return $parameter->getDefaultValue();
        }

        $this->unresolvablePrimitive($parameter);
    }
protected function resolvePrimitive ( ReflectionParameter $ parameter ) { if ( ! is_null ( $ concrete = $ this -> getContextualConcrete ( '$' . $ parameter -> name ) ) ) { return $ concrete instanceof Closure ? $ concrete ( $ this ) : $ concrete ; } if ( $ parameter -> isDefaultValueAvailable ( ) ) { return $ parameter -> getDefaultValue ( ) ; } $ this -> unresolvablePrimitive ( $ parameter ) ; }
Resolve a non-class hinted primitive dependency.

@param  \ReflectionParameter  $parameter
@return mixed

@throws \Illuminate\Contracts\Container\BindingResolutionException
Resolve a non - class hinted primitive dependency .