File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
src/Reflection/ReflectionProvider Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change 1414final class MemoizingReflectionProvider implements ReflectionProvider
1515{
1616
17- /** @var array<string, bool> */
17+ /** @var array<lowercase- string, bool> */
1818 private array $ hasClasses = [];
1919
20- /** @var array<string, ClassReflection> */
20+ /** @var array<lowercase- string, ClassReflection> */
2121 private array $ classes = [];
2222
23- /** @var array<string, string> */
23+ /** @var array<lowercase- string, string> */
2424 private array $ classNames = [];
2525
2626 public function __construct (private ReflectionProvider $ provider )
@@ -29,11 +29,12 @@ public function __construct(private ReflectionProvider $provider)
2929
3030 public function hasClass (string $ className ): bool
3131 {
32- if (isset ($ this ->hasClasses [$ className ])) {
33- return $ this ->hasClasses [$ className ];
32+ $ lowerClassName = strtolower ($ className );
33+ if (isset ($ this ->hasClasses [$ lowerClassName ])) {
34+ return $ this ->hasClasses [$ lowerClassName ];
3435 }
3536
36- return $ this ->hasClasses [$ className ] = $ this ->provider ->hasClass ($ className );
37+ return $ this ->hasClasses [$ lowerClassName ] = $ this ->provider ->hasClass ($ className );
3738 }
3839
3940 public function getClass (string $ className ): ClassReflection
You can’t perform that action at this time.
0 commit comments