| Conditions | 6 |
| Paths | 6 |
| Total Lines | 16 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 3 | ||
| Bugs | 2 | Features | 1 |
| 1 | <?php |
||
| 25 | public function findFileForClass(\ReflectionClass $class, $extension) |
||
| 26 | { |
||
| 27 | foreach ($this->dirs as $prefix => $dir) { |
||
| 28 | if ('' !== $prefix && 0 !== strpos($class->getNamespaceName(), $prefix)) { |
||
| 29 | continue; |
||
| 30 | } |
||
| 31 | |||
| 32 | $len = '' === $prefix ? 0 : strlen($prefix) + 1; |
||
| 33 | $path = $dir.'/'.str_replace('\\', '.', substr($class->name, $len)).'.'.$extension; |
||
| 34 | if (file_exists($path)) { |
||
| 35 | return $path; |
||
| 36 | } |
||
| 37 | } |
||
| 38 | |||
| 39 | return null; |
||
| 40 | } |
||
| 41 | |||
| 67 |