Failed Conditions
Pull Request — master (#101)
by
unknown
02:34
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
    /** @var string */
12
    private $expression;
13
14
    public function __construct(string $expression)
15
    {
16
        $this->expression = $expression;
17
    }
18
19
    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...
20
    {
21
        return $this->expression;
22
    }
23
}
24