private function isMethodReadable(\ReflectionMethod $method)
    {
        // if method starts with _ - skip
        if ('_' === substr($method->getName(), 0, 1)) {
            return false;
        }

        $hasNoRouteMethod = (bool) $this->readMethodAnnotation($method, 'NoRoute');
        $hasNoRouteClass = (bool) $this->readClassAnnotation($method->getDeclaringClass(), 'NoRoute');

        $hasNoRoute = $hasNoRouteMethod || $hasNoRouteClass;
        // since NoRoute extends Route we need to exclude all the method NoRoute annotations
        $hasRoute = (bool) $this->readMethodAnnotation($method, 'Route') && !$hasNoRouteMethod;

        // if method has NoRoute annotation and does not have Route annotation - skip
        if ($hasNoRoute && !$hasRoute) {
            return false;
        }

        return true;
    }
private function isMethodReadable(\ReflectionMethod $method)
    {
        // if method starts with _ - skip
        if ('_' === substr($method->getName(), 0, 1)) {
            return false;
        }

        $hasNoRouteMethod = (bool) $this->readMethodAnnotation($method, 'NoRoute');
        $hasNoRouteClass = (bool) $this->readClassAnnotation($method->getDeclaringClass(), 'NoRoute');

        $hasNoRoute = $hasNoRouteMethod || $hasNoRouteClass;
        // since NoRoute extends Route we need to exclude all the method NoRoute annotations
        $hasRoute = (bool) $this->readMethodAnnotation($method, 'Route') && !$hasNoRouteMethod;

        // if method has NoRoute annotation and does not have Route annotation - skip
        if ($hasNoRoute && !$hasRoute) {
            return false;
        }

        return true;
    }
private function isMethodReadable ( \ ReflectionMethod $ method ) { // if method starts with _ - skip if ( '_' === substr ( $ method -> getName ( ) , 0 , 1 ) ) { return false ; } $ hasNoRouteMethod = ( bool ) $ this -> readMethodAnnotation ( $ method , 'NoRoute' ) ; $ hasNoRouteClass = ( bool ) $ this -> readClassAnnotation ( $ method -> getDeclaringClass ( ) , 'NoRoute' ) ; $ hasNoRoute = $ hasNoRouteMethod || $ hasNoRouteClass ; // since NoRoute extends Route we need to exclude all the method NoRoute annotations $ hasRoute = ( bool ) $ this -> readMethodAnnotation ( $ method , 'Route' ) && ! $ hasNoRouteMethod ; // if method has NoRoute annotation and does not have Route annotation - skip if ( $ hasNoRoute && ! $ hasRoute ) { return false ; } return true ; }
Checks whether provided method is readable.

@param \ReflectionMethod $method

@return bool
Checks whether provided method is readable .