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

TellZeroStream   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 12
ccs 2
cts 2
cp 1
rs 10
wmc 1

1 Method

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