Passed
Push — master ( 6a3e65...ed7ae4 )
by Igor
03:41
created

Expression   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 13
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A __toString() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace ClickHouseDB\Query;
6
7
/**
8
 * Pass expression "as is" to be sent and executed at server.
9
 * P.ex.: `new Expression("UUIDStringToNum('0f372656-6a5b-4727-a4c4-f6357775d926')");`
10
 */
11
class Expression
12
{
13
    /** @var string */
14
    private $expression;
15
16 2
    public function __construct(string $expression)
17
    {
18 2
        $this->expression = $expression;
19 2
    }
20
21 2
    public function __toString() : string
22
    {
23 2
        return $this->expression;
24
    }
25
}
26