@@ 46-70 (lines=25) @@ | ||
43 | return ClassNameCandidates::fromClassNames($classNames); |
|
44 | } |
|
45 | ||
46 | private function getStrategies(): array |
|
47 | { |
|
48 | return [ |
|
49 | [ |
|
50 | $this->classLoader->getClassMap(), |
|
51 | new ClassmapNameInflector(), |
|
52 | ], |
|
53 | [ |
|
54 | $this->classLoader->getPrefixesPsr4(), |
|
55 | new Psr4NameInflector(), |
|
56 | ], |
|
57 | [ |
|
58 | $this->classLoader->getPrefixes(), |
|
59 | new Psr0NameInflector(), |
|
60 | ], |
|
61 | [ |
|
62 | $this->classLoader->getFallbackDirs(), |
|
63 | new Psr0NameInflector(), |
|
64 | ], |
|
65 | [ |
|
66 | $this->classLoader->getFallbackDirsPsr4(), |
|
67 | new Psr4NameInflector(), |
|
68 | ], |
|
69 | ]; |
|
70 | } |
|
71 | ||
72 | private function populateCandidates(FilePath $filePath, array $prefixes) |
|
73 | { |
@@ 51-76 (lines=26) @@ | ||
48 | return FilePathCandidates::fromFilePaths($candidates); |
|
49 | } |
|
50 | ||
51 | private function getStrategies(): array |
|
52 | { |
|
53 | return [ |
|
54 | [ |
|
55 | $this->classLoader->getPrefixesPsr4(), |
|
56 | new Psr4NameInflector(), |
|
57 | ], |
|
58 | [ |
|
59 | $this->classLoader->getPrefixes(), |
|
60 | new Psr0NameInflector(), |
|
61 | ], |
|
62 | [ |
|
63 | $this->classLoader->getClassMap(), |
|
64 | new ClassmapNameInflector(), |
|
65 | ], |
|
66 | [ |
|
67 | $this->classLoader->getFallbackDirs(), |
|
68 | new Psr0NameInflector(), |
|
69 | ], |
|
70 | [ |
|
71 | $this->classLoader->getFallbackDirsPsr4(), |
|
72 | // PSR0 name inflector works here as there is no prefix |
|
73 | new Psr0NameInflector(), |
|
74 | ], |
|
75 | ]; |
|
76 | } |
|
77 | ||
78 | private function resolveFile(&$candidates, array $prefixes, NameInflector $inflector, ClassName $className) |
|
79 | { |