protected function isInRootLine(NodeInterface $haystack = null, NodeInterface $needle) { if ($haystack === null) { return false; } return mb_strrpos($haystack->getPath(), $needle->getPath(), null, 'UTF-8') === 0; }