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

Expression   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
eloc 4
dl 0
loc 15
ccs 0
cts 7
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A __toString() 0 3 1
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