Issues (43)

src/Encoding/DeflateStream.php (2 issues)

1
<?php
2
3
namespace Http\Message\Encoding;
4
5
use Clue\StreamFilter as Filter;
6
use Psr\Http\Message\StreamInterface;
7
8
/**
9
 * Stream deflate (RFC 1951).
10
 *
11
 * @author Joel Wurtz <[email protected]>
12
 */
13
class DeflateStream extends FilteredStream
14
{
15
    /**
16
     * @param int $level
17
     */
18
    public function __construct(StreamInterface $stream, $level = -1)
19 5
    {
20
        parent::__construct($stream, ['window' => -15, 'level' => $level]);
21 5
22
        // @deprecated will be removed in 2.0
23
        $this->writeFilterCallback = Filter\fun($this->writeFilter(), ['window' => -15]);
0 ignored issues
show
The function fun was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

23
        $this->writeFilterCallback = /** @scrutinizer ignore-call */ Filter\fun($this->writeFilter(), ['window' => -15]);
Loading history...
Deprecated Code introduced by
The property Http\Message\Encoding\Fi...m::$writeFilterCallback has been deprecated: since version 1.5, will be removed in 2.0 ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

23
        /** @scrutinizer ignore-deprecated */ $this->writeFilterCallback = Filter\fun($this->writeFilter(), ['window' => -15]);

This property has been deprecated. The supplier of the class has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the property will be removed from the class and what other property to use instead.

Loading history...
24 5
    }
25 5
26
    /**
27
     * {@inheritdoc}
28
     */
29
    protected function readFilter()
30 5
    {
31
        return 'zlib.deflate';
32 5
    }
33
34
    /**
35
     * {@inheritdoc}
36
     */
37
    protected function writeFilter()
38 5
    {
39
        return 'zlib.inflate';
40 5
    }
41
}
42