Skip to content

Commit

Permalink
Adjusted detection of @no-named-arguments annotations, based on new…
Browse files Browse the repository at this point in the history
… BetterReflection doc-comment fetching API
  • Loading branch information
uzibhalepu authored and Ocramius committed Oct 10, 2022
1 parent fca3b98 commit d60f0ab
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,14 @@ private function compareParameter(ReflectionParameter $fromParameter, Reflection

private function methodHasNoNamedArgumentsAnnotation(ReflectionMethod|ReflectionFunction $function): bool
{
if ($function instanceof ReflectionMethod && str_contains($function->getDeclaringClass()->getDocComment(), self::NO_NAMED_ARGUMENTS_ANNOTATION)) {
if ($function instanceof ReflectionMethod
&& str_contains(
(string) $function
->getDeclaringClass()
->getDocComment(),
self::NO_NAMED_ARGUMENTS_ANNOTATION
)
) {
return true;
}

Expand Down

0 comments on commit d60f0ab

Please sign in to comment.