Conditions | 2 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 9 |
Lines | 14 |
Ratio | 100 % |
Tests | 7 |
CRAP Score | 2 |
Changes | 3 | ||
Bugs | 0 | Features | 2 |
1 | <?php |
||
23 | 1 | public static function find() |
|
24 | { |
||
25 | try { |
||
26 | $streamFactory = static::findOneByType(StreamFactory::class); |
||
27 | |||
28 | 1 | return new $streamFactory(); |
|
29 | 1 | } catch (DiscoveryFailedException $e) { |
|
30 | 1 | throw new NotFoundException( |
|
31 | 1 | 'No stream factories found. To use Guzzle or Diactoros factories install php-http/message and the chosen message implementation.', |
|
32 | 1 | 0, |
|
33 | $e |
||
34 | 1 | ); |
|
35 | } |
||
36 | } |
||
37 | } |
||
38 |