@@ -22,6 +22,7 @@ public static function makeFromReflectionAttributes(array $attributes): static
22
22
public function add ($ item ): static
23
23
{
24
24
unset($ this ->groups );
25
+
25
26
return parent ::add ($ item );
26
27
}
27
28
@@ -33,7 +34,7 @@ public function offsetSet($key, $value): void
33
34
34
35
private function maybeProcessItemsIntoGroups (): void
35
36
{
36
- if (!isset ($ this ->groups )) {
37
+ if (! isset ($ this ->groups )) {
37
38
foreach ($ this ->items as $ item ) {
38
39
$ implements = class_implements ($ item );
39
40
$ parents = class_parents ($ item );
@@ -50,7 +51,8 @@ private function maybeProcessItemsIntoGroups(): void
50
51
public function hasAttribute (string $ attributeClass ): bool
51
52
{
52
53
$ this ->maybeProcessItemsIntoGroups ();
53
- return !empty ($ this ->groups [$ attributeClass ]);
54
+
55
+ return ! empty ($ this ->groups [$ attributeClass ]);
54
56
}
55
57
56
58
/**
@@ -62,6 +64,7 @@ public function hasAttribute(string $attributeClass): bool
62
64
public function getAttributes (string $ attributeClass ): Collection
63
65
{
64
66
$ this ->maybeProcessItemsIntoGroups ();
67
+
65
68
return collect ($ this ->groups [$ attributeClass ] ?? []);
66
69
}
67
70
@@ -74,6 +77,7 @@ public function getAttributes(string $attributeClass): Collection
74
77
public function getAttribute (string $ attributeClass ): ?object
75
78
{
76
79
$ this ->maybeProcessItemsIntoGroups ();
80
+
77
81
return current ($ this ->groups [$ attributeClass ] ?? []) ?: null ;
78
82
}
79
83
}
0 commit comments