src/main/php/NewInstance.php
private static function methodsOf(\ReflectionClass $class): \Iterator
    {
        return new \CallbackFilterIterator(
                new \ArrayIterator($class->getMethods()),
                function(\ReflectionMethod $method)
                {
                    return !$method->isPrivate()
                            && !$method->isFinal()
                            && !$method->isStatic()
                            && !$method->isConstructor()
                            && !$method->isDestructor();
                }
        );
    }
private static function methodsOf(\ReflectionClass $class): \Iterator
    {
        return new \CallbackFilterIterator(
                new \ArrayIterator($class->getMethods()),
                function(\ReflectionMethod $method)
                {
                    return !$method->isPrivate()
                            && !$method->isFinal()
                            && !$method->isStatic()
                            && !$method->isConstructor()
                            && !$method->isDestructor();
                }
        );
    }
private static function methodsOf ( \ ReflectionClass $ class ) : \ Iterator { return new \ CallbackFilterIterator ( new \ ArrayIterator ( $ class -> getMethods ( ) ) , function ( \ ReflectionMethod $ method ) { return ! $ method -> isPrivate ( ) && ! $ method -> isFinal ( ) && ! $ method -> isStatic ( ) && ! $ method -> isConstructor ( ) && ! $ method -> isDestructor ( ) ; } ) ; }
returns applicable methods for given class

@param   \ReflectionClass  $class
@return  \Iterator
returns applicable methods for given class