Lines 71.42% 5 / 7
Methods 0.00% 0 / 1
Classes 0.00% 0 / 1
Name Lines Methods CRAP
 __construct 71.42% 5 / 7 0.00% 0 / 1 5.58
9class Stream extends \Slim\Psr7\Stream implements \Psr\Http\Message\StreamInterface
10{
11    public function __construct(mixed $stream = null)
12    {
13        if (null === $stream) {
14            $stream = fopen('php://memory', 'w+b');
15        }
16        if (!is_resource($stream)) {
17            $stream = fopen(is_string($stream) ? $stream : 'php://memory', 'w+b');
18        }
19        if (!is_resource($stream)) {
20            throw new \RuntimeException('Unable to open stream');
21        }
22        parent::__construct($stream);
23    }
24}