| Total Complexity | 4 |
| Total Lines | 32 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | class StreamFactory implements HttpStreamFactory |
||
| 12 | { |
||
| 13 | /** @var StreamFactoryInterface */ |
||
| 14 | private $streamFactory; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * StreamFactoryDecorator constructor. |
||
| 18 | * |
||
| 19 | * @param StreamFactoryInterface $streamFactory |
||
| 20 | */ |
||
| 21 | 5 | public function __construct(StreamFactoryInterface $streamFactory) |
|
| 24 | 5 | } |
|
| 25 | |||
| 26 | /** |
||
| 27 | * Creates a new PSR-7 stream. |
||
| 28 | * |
||
| 29 | * @param string|resource|StreamInterface|null $body |
||
| 30 | * |
||
| 31 | * @throws \InvalidArgumentException if the stream body is invalid |
||
| 32 | * @throws \RuntimeException if creating the stream from $body fails |
||
| 33 | * |
||
| 34 | * @return StreamInterface |
||
| 35 | */ |
||
| 36 | 3 | public function createStream($body = null) |
|
| 45 |