$doc =
$node->
getDocComment()?->
getText() ?? '';
if ($this->
isInternal($doc)) { $errors[] = 'Decoration error: Concrete class is marked as @internal. Remove `getDecorated` (if not intended that these classes can be decorated) or remove @internal annotation';
} if ($class->
implementsInterface(EventSubscriberInterface::
class)) { $errors[] = 'Decoration error: Decoration pattern is not compatible with event subscribers. Remove `getDecorated` (if not intended that these classes can be decorated) or extract EventSubscriberInterface into own class';
} // loop all methods and ensure that all public function also inside the parent class
/** @var ReflectionMethod $method */
foreach ($class->
getNativeReflection()->
getMethods() as $method) { if (!
$this->
isPublic($method)) { continue;
} if ($method->
getName() === '__construct'
) { continue;
} if ($parent->
hasMethod($method->
getName())) { continue;
}