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

TellZeroStream::tell()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
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
introduced by
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
}