Code Duplication    Length = 17-17 lines in 2 locations

src/Encoding/DeflateStream.php 1 location

@@ 12-28 (lines=17) @@
9
 *
10
 * @author Joel Wurtz <[email protected]>
11
 */
12
class DeflateStream extends FilteredStream
13
{
14
    public function __construct(StreamInterface $stream, $level = -1)
15
    {
16
        parent::__construct($stream, ['window' => -15, 'level' => $level], ['window' => -15]);
17
    }
18
19
    public function getReadFilter()
20
    {
21
        return 'zlib.deflate';
22
    }
23
24
    public function getWriteFilter()
25
    {
26
        return 'zlib.inflate';
27
    }
28
}
29

src/Encoding/InflateStream.php 1 location

@@ 12-28 (lines=17) @@
9
 *
10
 * @author Joel Wurtz <[email protected]>
11
 */
12
class InflateStream extends FilteredStream
13
{
14
    public function __construct(StreamInterface $stream, $level = -1)
15
    {
16
        parent::__construct($stream, ['window' => -15], ['window' => -15, 'level' => $level]);
17
    }
18
19
    public function getReadFilter()
20
    {
21
        return 'zlib.inflate';
22
    }
23
24
    public function getWriteFilter()
25
    {
26
        return 'zlib.deflate';
27
    }
28
}
29