| Total Complexity | 3 |
| Total Lines | 25 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | class Filename implements Handler |
||
| 14 | { |
||
| 15 | use JsonPointerAware; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * Determine whether the handler can handle the given source |
||
| 19 | * |
||
| 20 | * @param mixed $source |
||
| 21 | * @return bool |
||
| 22 | */ |
||
| 23 | 9 | public function handles($source): bool |
|
| 24 | { |
||
| 25 | 9 | return is_string($source) && is_file($source); |
|
| 26 | } |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Handle the given source |
||
| 30 | * |
||
| 31 | * @param mixed $source |
||
| 32 | * @param string $path |
||
| 33 | * @return Traversable |
||
| 34 | */ |
||
| 35 | 1 | public function handle($source, string $path): Traversable |
|
| 38 | } |
||
| 39 | } |
||
| 40 |