src/Jest/Injector.php
protected function reflectCallable($callable)
	{
		if (is_string($callable) && strpos($callable, '::')) {
			$callable = explode('::', $callable, 2);
		}

		if (is_a($callable, 'Closure')) {
			$reflection = new \ReflectionFunction($callable);
		} else if (is_object($callable)) {
			$reflection = new \ReflectionMethod(get_class($callable), '__invoke');
		} else if (is_array($callable) && count($callable) == 2) {
			$reflection = new \ReflectionMethod((is_object($callable[0]) ? get_class($callable[0]) : $callable[0]), $callable[1]);
		} else if (is_string($callable) && function_exists($callable)) {
			$reflection = new \ReflectionFunction($callable);
		}

		return $reflection;
	}
protected function reflectCallable($callable)
	{
		if (is_string($callable) && strpos($callable, '::')) {
			$callable = explode('::', $callable, 2);
		}

		if (is_a($callable, 'Closure')) {
			$reflection = new \ReflectionFunction($callable);
		} else if (is_object($callable)) {
			$reflection = new \ReflectionMethod(get_class($callable), '__invoke');
		} else if (is_array($callable) && count($callable) == 2) {
			$reflection = new \ReflectionMethod((is_object($callable[0]) ? get_class($callable[0]) : $callable[0]), $callable[1]);
		} else if (is_string($callable) && function_exists($callable)) {
			$reflection = new \ReflectionFunction($callable);
		}

		return $reflection;
	}
protected function reflectCallable ( $ callable ) { if ( is_string ( $ callable ) && strpos ( $ callable , '::' ) ) { $ callable = explode ( '::' , $ callable , 2 ) ; } if ( is_a ( $ callable , 'Closure' ) ) { $ reflection = new \ ReflectionFunction ( $ callable ) ; } else if ( is_object ( $ callable ) ) { $ reflection = new \ ReflectionMethod ( get_class ( $ callable ) , '__invoke' ) ; } else if ( is_array ( $ callable ) && count ( $ callable ) == 2 ) { $ reflection = new \ ReflectionMethod ( ( is_object ( $ callable [ 0 ] ) ? get_class ( $ callable [ 0 ] ) : $ callable [ 0 ] ) , $ callable [ 1 ] ) ; } else if ( is_string ( $ callable ) && function_exists ( $ callable ) ) { $ reflection = new \ ReflectionFunction ( $ callable ) ; } return $ reflection ; }
Reflect a callable

@param $callable Callable
The callable to reflect

@return ReflectionFunction|ReflectionMethod
Reflect a callable