src/Colorium/Runtime/Resolver.php
public static function ofClassMethod($callable)
    {
        // parse class::method to [class, method]
        if(is_string($callable) and strpos($callable, '::') !== false) {
            $callable = explode('::', $callable);
        }

        // resolve [class, method]
        if(is_array($callable) and count($callable) === 2) {
            $reflector = new \ReflectionMethod($callable[0], $callable[1]);
            if($reflector->isPublic() and !$reflector->isStatic() and !$reflector->isAbstract()) {
                $annotations = array_merge(
                    Annotation::ofClass($callable[0]),
                    Annotation::ofMethod($callable[0], $callable[1])
                );
                return new Invokable($callable, Invokable::CLASS_METHOD, $annotations, $reflector);
            }
        }
    }
public static function ofClassMethod($callable)
    {
        // parse class::method to [class, method]
        if(is_string($callable) and strpos($callable, '::') !== false) {
            $callable = explode('::', $callable);
        }

        // resolve [class, method]
        if(is_array($callable) and count($callable) === 2) {
            $reflector = new \ReflectionMethod($callable[0], $callable[1]);
            if($reflector->isPublic() and !$reflector->isStatic() and !$reflector->isAbstract()) {
                $annotations = array_merge(
                    Annotation::ofClass($callable[0]),
                    Annotation::ofMethod($callable[0], $callable[1])
                );
                return new Invokable($callable, Invokable::CLASS_METHOD, $annotations, $reflector);
            }
        }
    }
public static function ofClassMethod ( $ callable ) { // parse class::method to [class, method] if ( is_string ( $ callable ) and strpos ( $ callable , '::' ) !== false ) { $ callable = explode ( '::' , $ callable ) ; } // resolve [class, method] if ( is_array ( $ callable ) and count ( $ callable ) === 2 ) { $ reflector = new \ ReflectionMethod ( $ callable [ 0 ] , $ callable [ 1 ] ) ; if ( $ reflector -> isPublic ( ) and ! $ reflector -> isStatic ( ) and ! $ reflector -> isAbstract ( ) ) { $ annotations = array_merge ( Annotation :: ofClass ( $ callable [ 0 ] ) , Annotation :: ofMethod ( $ callable [ 0 ] , $ callable [ 1 ] ) ) ; return new Invokable ( $ callable , Invokable :: CLASS_METHOD , $ annotations , $ reflector ) ; } } }
Resolve if callable is class method

@param $callable
@return Invokable
Resolve if callable is class method