Skip to content

Commit

Permalink
Merge pull request #49242 from nextcloud/backport/49237/stable30
Browse files Browse the repository at this point in the history
  • Loading branch information
provokateurin authored Nov 13, 2024
2 parents cda0a65 + b45dc98 commit 05de3df
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,12 @@ public function beforeController($controller, $methodName) {
*/
protected function hasAnnotationOrAttribute(ReflectionMethod $reflectionMethod, string $annotationName, string $attributeClass): bool {
if ($this->reflector->hasAnnotation($annotationName)) {
$this->logger->debug($reflectionMethod->getDeclaringClass()->getName() . '::' . $reflectionMethod->getName() . ' uses the @' . $annotationName . ' annotation and should use the #[' . $attributeClass . '] attribute instead');
return true;
}


if (!empty($reflectionMethod->getAttributes($attributeClass))) {
$this->logger->debug($reflectionMethod->getDeclaringClass()->getName() . '::' . $reflectionMethod->getName() . ' uses the @' . $annotationName . ' annotation and should use the #[' . $attributeClass . '] attribute instead');
return true;
}

Expand Down

0 comments on commit 05de3df

Please sign in to comment.