Total Complexity | 3 |
Total Lines | 31 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
13 | class Psr7Stream extends Resource |
||
14 | { |
||
15 | /** |
||
16 | * Determine whether the handler can handle the given source |
||
17 | * |
||
18 | * @param mixed $source |
||
19 | * @return bool |
||
20 | */ |
||
21 | 3 | public function handles($source): bool |
|
22 | { |
||
23 | 3 | return $source instanceof StreamInterface; |
|
24 | } |
||
25 | |||
26 | /** |
||
27 | * Handle the given source |
||
28 | * |
||
29 | * @param mixed $source |
||
30 | * @param string $path |
||
31 | * @return Traversable |
||
32 | */ |
||
33 | 5 | public function handle($source, string $path): Traversable |
|
44 | } |
||
45 | } |
||
46 |