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

Expression   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
eloc 4
dl 0
loc 25
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
class Expression
6
{
7
    /**
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...
8
     * @var string
9
     */
10
    private $expression;
11
12
    /**
13
     * Expression constructor.
0 ignored issues
show
introduced by
Documentation comment contains forbidden comment "Expression constructor.".
Loading history...
14
     * Pass expression "as is" it should be sent and executed at server.
15
     * P.ex.: `new Expression("UUIDStringToNum('0f372656-6a5b-4727-a4c4-f6357775d926')");`
16
     *
17
     * @param string $expression
0 ignored issues
show
introduced by
Method \ClickHouseDB\Query\Expression::__construct() has useless @param annotation for parameter $expression.
Loading history...
18
     */
19
    public function __construct(string $expression)
20
    {
21
        $this->expression = $expression;
22
    }
23
24
    /**
25
     * @return string
26
     */
27
    public function __toString()
0 ignored issues
show
introduced by
Method \ClickHouseDB\Query\Expression::__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...
28
    {
29
        return $this->expression;
30
    }
31
}