Merge pull request #49237 from nextcloud/fix/noid/deprecation-correct-case

This commit is contained in:
Kate 2024-11-13 07:28:33 +01:00 committed by GitHub
commit a489d88a2b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -102,12 +102,12 @@ class CORSMiddleware extends Middleware {
*/
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;
}