Passed
Push — master ( b10cd9...e8febd )
by Igor
10:12 queued 07:01
created

Query   A

Complexity

Total Complexity 15

Size/Duplication

Total Lines 128
Duplicated Lines 0 %

Test Coverage

Coverage 88.24%

Importance

Changes 5
Bugs 1 Features 0
Metric Value
eloc 46
c 5
b 1
f 0
dl 0
loc 128
ccs 30
cts 34
cp 0.8824
rs 10
wmc 15

6 Methods

Rating   Name   Duplication   Size   Complexity  
A setFormat() 0 3 1
A __construct() 0 8 2
A __toString() 0 3 1
A applyFormatQuery() 0 25 5
A getFormat() 0 4 1
A toSql() 0 17 5
1
<?php
0 ignored issues
show
introduced by
Missing declare(strict_types=1).
Loading history...
2
3
namespace ClickHouseDB\Query;
4
5
use ClickHouseDB\Exception\QueryException;
6
use function sizeof;
7
8
class Query
9
{
10
    /**
0 ignored issues
show
introduced by
Found multi-line comment for property \ClickHouseDB\Query\Query::$sql with single line content, use one-line comment instead.
Loading history...
11
     * @var string
12
     */
13
    protected $sql;
14
15
    /**
0 ignored issues
show
introduced by
Found multi-line comment for property \ClickHouseDB\Query\Query::$format with single line content, use one-line comment instead.
Loading history...
16
     * @var string|null
17
     */
18
    protected $format = null;
19
20
    /**
0 ignored issues
show
introduced by
Found multi-line comment for property \ClickHouseDB\Query\Query::$degenerations with single line content, use one-line comment instead.
Loading history...
21
     * @var array
0 ignored issues
show
introduced by
@var annotation of property \ClickHouseDB\Query\Query::$degenerations does not specify type hint for its items.
Loading history...
22
     */
23
    private $degenerations = [];
24
25
    private $supportFormats=[
0 ignored issues
show
introduced by
Property \ClickHouseDB\Query\Query::$supportFormats does not have @var annotation.
Loading history...
Coding Style introduced by
Equals sign not aligned correctly; expected 1 space but found 0 spaces
Loading history...
26
        "FORMAT\\s+TSVRaw",
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal FORMAT\\s+TSVRaw does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
27
        "FORMAT\\s+TSVWithNamesAndTypes",
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal FORMAT\\s+TSVWithNamesAndTypes does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
28
        "FORMAT\\s+TSVWithNames",
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal FORMAT\\s+TSVWithNames does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
29
        "FORMAT\\s+TSV",
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal FORMAT\\s+TSV does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
30
        "FORMAT\\s+Vertical",
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal FORMAT\\s+Vertical does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
31
        "FORMAT\\s+JSONCompact",
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal FORMAT\\s+JSONCompact does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
32
        "FORMAT\\s+JSONEachRow",
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal FORMAT\\s+JSONEachRow does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
33
        "FORMAT\\s+TSKV",
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal FORMAT\\s+TSKV does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
34
        "FORMAT\\s+TabSeparatedWithNames",
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal FORMAT\\s+TabSeparatedWithNames does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
35
        "FORMAT\\s+TabSeparatedWithNamesAndTypes",
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal FORMAT\\s+TabSeparatedWithNamesAndTypes does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
36
        "FORMAT\\s+TabSeparatedRaw",
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal FORMAT\\s+TabSeparatedRaw does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
37
        "FORMAT\\s+BlockTabSeparated",
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal FORMAT\\s+BlockTabSeparated does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
38
        "FORMAT\\s+CSVWithNames",
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal FORMAT\\s+CSVWithNames does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
39
        "FORMAT\\s+CSV",
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal FORMAT\\s+CSV does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
40
        "FORMAT\\s+JSON",
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal FORMAT\\s+JSON does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
41
        "FORMAT\\s+TabSeparated"
0 ignored issues
show
introduced by
MultiLine arrays must have a trailing comma after the last element.
Loading history...
Coding Style Comprehensibility introduced by
The string literal FORMAT\\s+TabSeparated does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
42
    ];
43
44
    /**
45
     * Query constructor.
0 ignored issues
show
introduced by
Documentation comment contains forbidden comment "Query constructor.".
Loading history...
46
     * @param string $sql
0 ignored issues
show
introduced by
Expected 1 lines between description and annotations, found 0.
Loading history...
47
     * @param array $degenerations
0 ignored issues
show
introduced by
@param annotation of method \ClickHouseDB\Query\Query::__construct() does not specify type hint for items of its traversable parameter $degenerations.
Loading history...
Coding Style introduced by
Expected 2 spaces after parameter type; 1 found
Loading history...
48
     */
49 44
    public function __construct($sql, $degenerations = [])
0 ignored issues
show
introduced by
Method \ClickHouseDB\Query\Query::__construct() does not have parameter type hint for its parameter $sql but it should be possible to add it based on @param annotation "string".
Loading history...
introduced by
Method \ClickHouseDB\Query\Query::__construct() does not have parameter type hint for its parameter $degenerations but it should be possible to add it based on @param annotation "array".
Loading history...
50
    {
51 44
        if (!trim($sql))
0 ignored issues
show
Coding Style introduced by
Expected 1 space(s) after NOT operator; 0 found
Loading history...
introduced by
Function trim() should not be referenced via a fallback global name, but via a use statement.
Loading history...
52
        {
53 1
            throw new QueryException('Empty Query');
54
        }
55 43
        $this->sql = $sql;
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 11 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
56 43
        $this->degenerations = $degenerations;
57 43
    }
58
59
    /**
60
     * @param string|null $format
61
     */
62 37
    public function setFormat($format)
0 ignored issues
show
introduced by
Method \ClickHouseDB\Query\Query::setFormat() does not have parameter type hint for its parameter $format but it should be possible to add it based on @param annotation "string|null".
Loading history...
introduced by
Method \ClickHouseDB\Query\Query::setFormat() does not have void return type hint.
Loading history...
63
    {
64 37
        $this->format = $format;
65 37
    }
66
67
68 37
    private function applyFormatQuery()
0 ignored issues
show
introduced by
Method \ClickHouseDB\Query\Query::applyFormatQuery() does not have return type hint nor @return annotation for its return value.
Loading history...
69
    {
70
        // FORMAT\s(\w)*$
71 37
        if (null === $this->format) {
0 ignored issues
show
introduced by
Yoda comparisons are disallowed.
Loading history...
72
            return false;
73
        }
74 37
        $supportFormats = implode("|",$this->supportFormats);
0 ignored issues
show
introduced by
Function implode() should not be referenced via a fallback global name, but via a use statement.
Loading history...
Coding Style Comprehensibility introduced by
The string literal | does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
75
76 37
        $this->sql = trim($this->sql);
0 ignored issues
show
introduced by
Function trim() should not be referenced via a fallback global name, but via a use statement.
Loading history...
77 37
        if (substr($this->sql, -1) == ';') {
0 ignored issues
show
introduced by
Function substr() should not be referenced via a fallback global name, but via a use statement.
Loading history...
introduced by
Operator == is disallowed, use === instead.
Loading history...
78
            $this->sql = substr($this->sql, 0, -1);
0 ignored issues
show
introduced by
Function substr() should not be referenced via a fallback global name, but via a use statement.
Loading history...
79
        }
80
81 37
        $matches = [];
82 37
        if (preg_match_all('%(' . $supportFormats . ')%ius', $this->sql, $matches)) {
0 ignored issues
show
introduced by
Function preg_match_all() should not be referenced via a fallback global name, but via a use statement.
Loading history...
Coding Style introduced by
Blank line found at start of control structure
Loading history...
83
84
            // skip add "format json"
85 2
            if (isset($matches[0]))
86
            {
0 ignored issues
show
Coding Style introduced by
Blank line found at start of control structure
Loading history...
87
88 2
                $this->format = trim(str_ireplace('format', '', $matches[0][0]));
0 ignored issues
show
introduced by
Function trim() should not be referenced via a fallback global name, but via a use statement.
Loading history...
introduced by
Function str_ireplace() should not be referenced via a fallback global name, but via a use statement.
Loading history...
89
0 ignored issues
show
Coding Style introduced by
Blank line found at end of control structure
Loading history...
90
            }
91
        } else {
92 35
            $this->sql = $this->sql . ' FORMAT ' . $this->format;
0 ignored issues
show
introduced by
Use ".=" operator instead of "=" and ".".
Loading history...
93
        }
94
0 ignored issues
show
Coding Style introduced by
Functions must not contain multiple empty lines in a row; found 6 empty lines
Loading history...
95
96
97
98
99
100 37
    }
0 ignored issues
show
Coding Style introduced by
Function closing brace must go on the next line following the body; found 6 blank lines before brace
Loading history...
101
102
    /**
103
     * @return null|string
0 ignored issues
show
introduced by
Null type hint should be on last position.
Loading history...
104
     */
105 43
    public function getFormat()
0 ignored issues
show
introduced by
Method \ClickHouseDB\Query\Query::getFormat() does not have return type hint for its return value but it should be possible to add it based on @return annotation "null|string".
Loading history...
106
    {
0 ignored issues
show
Coding Style introduced by
Expected 0 blank lines after opening function brace; 1 found
Loading history...
107
108 43
        return $this->format;
109
    }
110
111 43
    public function toSql()
0 ignored issues
show
introduced by
Method \ClickHouseDB\Query\Query::toSql() does not have return type hint nor @return annotation for its return value.
Loading history...
112
    {
113 43
        if ($this->format !== null) {
114 37
            $this->applyFormatQuery();
115
        }
116
117 43
        if (sizeof($this->degenerations))
0 ignored issues
show
Coding Style introduced by
The use of function sizeof() is forbidden; use count() instead
Loading history...
118
        {
119 43
            foreach ($this->degenerations as $degeneration)
120
            {
121 43
                if ($degeneration instanceof Degeneration) {
0 ignored issues
show
introduced by
Use early exit to reduce code nesting.
Loading history...
122 43
                    $this->sql = $degeneration->process($this->sql);
123
                }
124
            }
125
        }
126
127 43
        return $this->sql;
128
    }
129
130
    /**
131
     * @return string
132
     */
133
    public function __toString()
0 ignored issues
show
introduced by
Method \ClickHouseDB\Query\Query::__toString() does not have return type hint for its return value but it should be possible to add it based on @return annotation "string".
Loading history...
134
    {
135
        return $this->toSql();
136
    }
137
}
138