Passed
Push — master ( f41556...5b26a6 )
by Zaahid
13:23
created

src/TellZeroStream.php (1 issue)

Severity
1
<?php
2
/**
3
 * This file is part of the ZBateson\StreamDecorators project.
4
 *
5
 * @license http://opensource.org/licenses/bsd-license.php BSD
6
 */
7
8
namespace ZBateson\StreamDecorators;
9
10
use Psr\Http\Message\StreamInterface;
11
use GuzzleHttp\Psr7\StreamDecoratorTrait;
12
13
/**
14
 * Calling tell() always returns 0.  Used by DecoratedCachingStream so a
15
 * CachingStream can use a BufferedStream, because BufferedStream throws an
16
 * exception in tell().
17
 */
18
class TellZeroStream implements StreamInterface
19
{
20
    use StreamDecoratorTrait;
21
22
    /**
23
     * @var StreamInterface
24
     */
25
    private StreamInterface $stream;
0 ignored issues
show
The private property $stream is not used, and could be removed.
Loading history...
26
27 1
    public function tell() : int
28
    {
29 1
        return 0;
30
    }
31
}