Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
3 / 3 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
Stream | |
100.00% |
3 / 3 |
|
100.00% |
1 / 1 |
3 | |
100.00% |
1 / 1 |
__construct | |
100.00% |
3 / 3 |
|
100.00% |
1 / 1 |
3 |
1 | <?php |
2 | |
3 | namespace BO\Zmsclient\Psr7; |
4 | |
5 | /** |
6 | * Layer to change PSR7 implementation if necessary |
7 | */ |
8 | class Stream extends \Slim\Psr7\Stream implements \Psr\Http\Message\StreamInterface |
9 | { |
10 | public function __construct($stream = null) |
11 | { |
12 | $stream = (null === $stream) ? fopen('php://memory', 'w+b') : $stream; |
13 | $stream = (!is_resource($stream)) ? fopen($stream, 'w+b') : $stream; |
14 | parent::__construct($stream); |
15 | } |
16 | } |