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

Streamable   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 4
c 1
b 0
f 0
dl 0
loc 15
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getStream() 0 3 1
A __construct() 0 3 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