DechunkStream   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A writeFilter() 0 3 1
A readFilter() 0 3 1
1
<?php
2
3
namespace Http\Message\Encoding;
4
5
/**
6
 * Decorate a stream which is chunked.
7
 *
8
 * Allow to decode a chunked stream
9
 *
10
 * @author Joel Wurtz <[email protected]>
11
 */
12
class DechunkStream extends FilteredStream
13
{
14
    /**
15
     * {@inheritdoc}
16
     */
17 5
    protected function readFilter()
18
    {
19 5
        return 'dechunk';
20
    }
21
22
    /**
23
     * {@inheritdoc}
24
     */
25 5
    protected function writeFilter()
26
    {
27 5
        return 'chunk';
28
    }
29
}
30