private function check(NodeInterface $node) : bool { return $node instanceof ElementInterface && $node->attributes()->contains('role') && $node->attributes()->get('role')->value() === $this->role; }