Issues (2354)

src/Transport/StreamWrite.php (16 issues)

1
<?php
0 ignored issues
show
Missing declare(strict_types=1).
Loading history...
2
3
namespace ClickHouseDB\Transport;
4
5
/**
6
 * Class StreamWrite
0 ignored issues
show
Documentation comment contains forbidden comment "Class StreamWrite".
Loading history...
7
 * @package ClickHouseDB\Transport
0 ignored issues
show
Expected 1 lines between description and annotations, found 0.
Loading history...
Use of annotation @package is forbidden.
Loading history...
8
 */
9
class StreamWrite extends Stream
10
{
0 ignored issues
show
There must be exactly 0 empty lines after class opening brace.
Loading history...
Opening brace must not be followed by a blank line
Loading history...
11
12 1
    public function __construct( $source)
0 ignored issues
show
Expected 0 spaces after opening parenthesis; 1 found
Loading history...
Method \ClickHouseDB\Transport\StreamWrite::__construct() does not have parameter type hint nor @param annotation for its parameter $source.
Loading history...
Expected 0 blank lines before function; 1 found
Loading history...
13
    {
0 ignored issues
show
Expected 0 blank lines after opening function brace; 1 found
Loading history...
14
15 1
        parent::__construct($source);
16
17 1
    }
0 ignored issues
show
Function closing brace must go on the next line following the body; found 1 blank lines before brace
Loading history...
18
19 1
    public function isWrite()
0 ignored issues
show
Method \ClickHouseDB\Transport\StreamWrite::isWrite() does not have return type hint nor @return annotation for its return value.
Loading history...
20
    {
21 1
        return true;
22
    }
0 ignored issues
show
Expected 1 blank line after function; 0 found
Loading history...
23 1
    public function applyGzip()
0 ignored issues
show
Method \ClickHouseDB\Transport\StreamWrite::applyGzip() does not have void return type hint.
Loading history...
24
    {
25 1
        stream_filter_append($this->getStream(), 'zlib.deflate', STREAM_FILTER_READ, ['window' => 30]);
0 ignored issues
show
Function stream_filter_append() should not be referenced via a fallback global name, but via a use statement.
Loading history...
Constant STREAM_FILTER_READ should not be referenced via a fallback global name, but via a use statement.
Loading history...
26 1
        $this->enableGzipHeader();
27 1
    }
28
}
29