private function containsLine($reflection, int $lineNumber) : bool
    {
        if (! method_exists($reflection, 'getStartLine')) {
            throw new InvalidArgumentException('Reflection does not have getStartLine method');
        }

        if (! method_exists($reflection, 'getEndLine')) {
            throw new InvalidArgumentException('Reflection does not have getEndLine method');
        }

        return $lineNumber >= $reflection->getStartLine() && $lineNumber <= $reflection->getEndLine();
    }
private function containsLine($reflection, int $lineNumber) : bool
    {
        if (! method_exists($reflection, 'getStartLine')) {
            throw new InvalidArgumentException('Reflection does not have getStartLine method');
        }

        if (! method_exists($reflection, 'getEndLine')) {
            throw new InvalidArgumentException('Reflection does not have getEndLine method');
        }

        return $lineNumber >= $reflection->getStartLine() && $lineNumber <= $reflection->getEndLine();
    }
private function containsLine ( $ reflection , int $ lineNumber ) : bool { if ( ! method_exists ( $ reflection , 'getStartLine' ) ) { throw new InvalidArgumentException ( 'Reflection does not have getStartLine method' ) ; } if ( ! method_exists ( $ reflection , 'getEndLine' ) ) { throw new InvalidArgumentException ( 'Reflection does not have getEndLine method' ) ; } return $ lineNumber >= $ reflection -> getStartLine ( ) && $ lineNumber <= $ reflection -> getEndLine ( ) ; }
Check to see if the line is within the boundaries of the reflection specified.

@param ReflectionMethod|ReflectionClass|ReflectionFunction|Reflection $reflection

@throws InvalidArgumentException
Check to see if the line is within the boundaries of the reflection specified .