if ($class->
isInterface() ||
$this->
isTestClass($class)) { return [];
} if (!
($node->
isPublic() ||
$node->
isProtected()) ||
$node->
isAbstract() ||
$node->
isMagic()) { return [];
} $methodContent =
$this->
getMethodContent($node,
$scope,
$class);
$method =
$class->
getMethod($node->name->name,
$scope);
$classDeprecation =
$class->
getDeprecatedDescription();
if ($classDeprecation && !
$this->
handlesDeprecationCorrectly($classDeprecation,
$methodContent)) { return [ \
sprintf( 'Class "%s" is marked as deprecated, but method "%s" does not call "Feature::triggerDeprecationOrThrow". All public methods of deprecated classes need to trigger a deprecation warning.',
$class->
getName(),
$method->
getName() ),
];
} $methodDeprecation =
$method->
getDeprecatedDescription() ?? '';