Failed Conditions
Pull Request — master (#101)
by
unknown
02:16
created

Expression::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
ccs 0
cts 3
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
0 ignored issues
show
introduced by
Missing declare(strict_types = 1).
Loading history...
2
3
namespace ClickHouseDB\Query;
4
5
/**
6
 * Pass expression "as is" to be sent and executed at server.
7
 * P.ex.: `new Expression("UUIDStringToNum('0f372656-6a5b-4727-a4c4-f6357775d926')");`
8
 */
9
class Expression
10
{
11
    /**
0 ignored issues
show
introduced by
Found multi-line comment for property \ClickHouseDB\Query\Expression::$expression with single line content, use one-line comment instead.
Loading history...
12
     * @var string
13
     */
14
    private $expression;
15
16
    public function __construct(string $expression)
17
    {
18
        $this->expression = $expression;
19
    }
20
21
    public function __toString(): string
0 ignored issues
show
introduced by
There must be exactly 1 whitespace between closing parenthesis and return type colon.
Loading history...
22
    {
23
        return $this->expression;
24
    }
25
}
26