@@ -73,7 +73,7 @@ public function withoutAll(string $stampFqcn): self
73
73
{
74
74
$ cloned = clone $ this ;
75
75
76
- unset($ cloned ->stamps [$ this -> resolveAlias ( $ stampFqcn) ]);
76
+ unset($ cloned ->stamps [$ stampFqcn ]);
77
77
78
78
return $ cloned ;
79
79
}
@@ -84,7 +84,6 @@ public function withoutAll(string $stampFqcn): self
84
84
public function withoutStampsOfType (string $ type ): self
85
85
{
86
86
$ cloned = clone $ this ;
87
- $ type = $ this ->resolveAlias ($ type );
88
87
89
88
foreach ($ cloned ->stamps as $ class => $ stamps ) {
90
89
if ($ class === $ type || is_subclass_of ($ class , $ type )) {
@@ -97,7 +96,7 @@ public function withoutStampsOfType(string $type): self
97
96
98
97
public function last (string $ stampFqcn ): ?StampInterface
99
98
{
100
- return isset ($ this ->stamps [$ stampFqcn = $ this -> resolveAlias ( $ stampFqcn) ]) ? end ($ this ->stamps [$ stampFqcn ]) : null ;
99
+ return isset ($ this ->stamps [$ stampFqcn = $ stampFqcn ]) ? end ($ this ->stamps [$ stampFqcn ]) : null ;
101
100
}
102
101
103
102
/**
@@ -106,7 +105,7 @@ public function last(string $stampFqcn): ?StampInterface
106
105
public function all (string $ stampFqcn = null ): array
107
106
{
108
107
if (null !== $ stampFqcn ) {
109
- return $ this ->stamps [$ this -> resolveAlias ( $ stampFqcn) ] ?? [];
108
+ return $ this ->stamps [$ stampFqcn ] ?? [];
110
109
}
111
110
112
111
return $ this ->stamps ;
@@ -119,14 +118,4 @@ public function getMessage(): object
119
118
{
120
119
return $ this ->message ;
121
120
}
122
-
123
- /**
124
- * BC to be removed in 6.0.
125
- */
126
- private function resolveAlias (string $ fqcn ): string
127
- {
128
- static $ resolved ;
129
-
130
- return $ resolved [$ fqcn ] ?? ($ resolved [$ fqcn ] = (new \ReflectionClass ($ fqcn ))->getName ());
131
- }
132
121
}
0 commit comments