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