src/Behat/Behat/Context/Reader/AnnotatedContextReader.php
private function readMethodCallees($class, ReflectionMethod $method)
    {
        $callees = array();

        // read parent annotations
        try {
            $prototype = $method->getPrototype();
            // error occurs on every second PHP stable release - getPrototype() returns itself
            if ($prototype->getDeclaringClass()->getName() !== $method->getDeclaringClass()->getName()) {
                $callees = array_merge($callees, $this->readMethodCallees($class, $prototype));
            }
        } catch (ReflectionException $e) {
        }

        if ($docBlock = $method->getDocComment()) {
            $callees = array_merge($callees, $this->readDocBlockCallees($class, $method, $docBlock));
        }

        return $callees;
    }
private function readMethodCallees($class, ReflectionMethod $method)
    {
        $callees = array();

        // read parent annotations
        try {
            $prototype = $method->getPrototype();
            // error occurs on every second PHP stable release - getPrototype() returns itself
            if ($prototype->getDeclaringClass()->getName() !== $method->getDeclaringClass()->getName()) {
                $callees = array_merge($callees, $this->readMethodCallees($class, $prototype));
            }
        } catch (ReflectionException $e) {
        }

        if ($docBlock = $method->getDocComment()) {
            $callees = array_merge($callees, $this->readDocBlockCallees($class, $method, $docBlock));
        }

        return $callees;
    }
private function readMethodCallees ( $ class , ReflectionMethod $ method ) { $ callees = array ( ) ; // read parent annotations try { $ prototype = $ method -> getPrototype ( ) ; // error occurs on every second PHP stable release - getPrototype() returns itself if ( $ prototype -> getDeclaringClass ( ) -> getName ( ) !== $ method -> getDeclaringClass ( ) -> getName ( ) ) { $ callees = array_merge ( $ callees , $ this -> readMethodCallees ( $ class , $ prototype ) ) ; } } catch ( ReflectionException $ e ) { } if ( $ docBlock = $ method -> getDocComment ( ) ) { $ callees = array_merge ( $ callees , $ this -> readDocBlockCallees ( $ class , $ method , $ docBlock ) ) ; } return $ callees ; }
Loads callees associated with specific method.

@param string           $class
@param ReflectionMethod $method

@return Callee[]
Loads callees associated with specific method .