Passed
Push — master ( 9013bb...125cf1 )
by Kirill
03:56
created

Streamable::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 1
1
<?php
2
3
/**
4
 * Spiral Framework.
5
 *
6
 * @license   MIT
7
 * @author    Anton Titov (Wolfy-J)
8
 */
9
10
declare(strict_types=1);
11
12
namespace Spiral\Tests\Http;
13
14
use Psr\Http\Message\StreamInterface;
15
use Spiral\Streams\StreamableInterface;
16
17
class Streamable implements StreamableInterface
18
{
19
    private $stream;
20
21
    public function __construct(StreamInterface $stream)
22
    {
23
        $this->stream = $stream;
24
    }
25
26
    /**
27
     * @return StreamInterface
28
     */
29
    public function getStream(): StreamInterface
30
    {
31
        return $this->stream;
32
    }
33
}
34