| Conditions | 4 |
| Paths | 5 |
| Total Lines | 18 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 20 |
| Changes | 0 | ||
| 1 | <?php |
||
| 47 | public function getUris(string $scheme = '*') : \Generator |
||
| 48 | { |
||
| 49 | foreach ($this->getResourceListGenerator() as list($class, $file)) { |
||
| 50 | $paths = explode('\\', $class); |
||
| 51 | $path = array_slice($paths, 3); |
||
| 52 | array_walk($path, [$this, 'camel2snake']); |
||
| 53 | if ($scheme === '*') { |
||
| 54 | $uri = sprintf('%s://self/%s', $path[0], implode('/', array_slice($path, 1))); |
||
| 55 | |||
| 56 | yield $uri; |
||
| 57 | } |
||
| 58 | if ($scheme === $path[0]) { |
||
| 59 | $uri = sprintf('/%s', implode('/', array_slice($path, 1))); |
||
| 60 | |||
| 61 | yield $uri; |
||
| 62 | } |
||
| 63 | } |
||
| 64 | } |
||
| 65 | |||
| 71 |