Skip to content

Commit

Permalink
loop not by name
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonasik committed Feb 2, 2024
1 parent 525dd53 commit a705eac
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Traits/AttributeResolverTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ public function getAttributes(?string $name = null, int $flags = 0): array
foreach ($attributeHolder->attrGroups as $attrGroup) {
foreach ($attrGroup->attrs as $attr) {
if ($name !== null) {
return [new ReflectionAttribute($name, $flags, $attributeHolder)];
$attributes[] = new ReflectionAttribute($name, $flags, $attributeHolder);
} else {
$attributes[] = new ReflectionAttribute($attr->toString(), $flags, $attributeHolder);
}

$attributes[] = new ReflectionAttribute($attr->toString(), $flags, $attributeHolder);
}
}

Expand Down

0 comments on commit a705eac

Please sign in to comment.