protected function getFunctionHint(Closure $callback)
    {
        $function = new ReflectionFunction($callback);

        if ($function->getNumberOfParameters() == 0) {
            return;
        }

        $expected = $function->getParameters()[0];

        if (! $expected->getClass()) {
            return;
        }

        return $expected->getClass()->name;
    }
protected function getFunctionHint(Closure $callback)
    {
        $function = new ReflectionFunction($callback);

        if ($function->getNumberOfParameters() == 0) {
            return;
        }

        $expected = $function->getParameters()[0];

        if (! $expected->getClass()) {
            return;
        }

        return $expected->getClass()->name;
    }
protected function getFunctionHint ( Closure $ callback ) { $ function = new ReflectionFunction ( $ callback ) ; if ( $ function -> getNumberOfParameters ( ) == 0 ) { return ; } $ expected = $ function -> getParameters ( ) [ 0 ] ; if ( ! $ expected -> getClass ( ) ) { return ; } return $ expected -> getClass ( ) -> name ; }
Get the type hint for this closure's first argument.

@param  \Closure  $callback
@return mixed
Get the type hint for this closure s first argument .