| Conditions | 4 |
| Paths | 4 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 4.0312 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 38 | 2 | public function __invoke(string $symbolName): \Generator |
|
| 39 | { |
||
| 40 | 2 | if (!$this->autoloader) { |
|
| 41 | return; |
||
| 42 | } |
||
| 43 | |||
| 44 | 2 | $path = $this->autoloader->findFile(\ltrim($symbolName, '\\')); |
|
| 45 | 2 | if ($path === false) { |
|
| 46 | 1 | return; |
|
| 47 | } |
||
| 48 | |||
| 49 | 1 | if (preg_match($this->pathRegex, $path, $captures)) { |
|
| 50 | 1 | yield $captures[1]; |
|
| 51 | } |
||
| 54 |