Test Failed
Push — master ( a5075e...c87161 )
by Zaahid
04:53
created

NonClosingLimitStream::detach()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
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
namespace ZBateson\StreamDecorators;
8
9
use GuzzleHttp\Psr7\LimitStream;
10
11
/**
12
 * Extention of GuzzleHttp\Psr7\LimitStream that doesn't close the underlying
13
 * stream when closed or detached.
14
 *
15
 * @author Zaahid Bateson
16
 */
17
class NonClosingLimitStream extends LimitStream
18
{
19
    public function close()
20
    {
21
        $this->stream = null;
22
    }
23
24
    public function detach()
25
    {
26
        $this->stream = null;
27
    }
28
}
29