getStmts example

return !\str_contains((string) $doc, 'reason:visibility-change');
    }

    private function isBaseImplementation(InClassNode $node): bool
    {
        $method = $node->getOriginalNode()->getMethod('getDecorated');

        if (!$method) {
            return false;
        }

        $firstStatement = ($method->getStmts() ?? [])[0];

        if ($firstStatement instanceof Node\Stmt\Throw_) {
            return true;
        }

        return false;
    }
}
Home | Imprint | This part of the site doesn't use cookies.