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

Expression   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 23
ccs 0
cts 7
cp 0
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
0 ignored issues
show
introduced by
Missing declare(strict_types = 1).
Loading history...
2
3
namespace ClickHouseDB\Query;
4
5
/**
6
 * Query expression
7
 *
8
 * @package ClickHouseDB
0 ignored issues
show
introduced by
Use of annotation @package is forbidden.
Loading history...
9
 */
10
class Expression
11
{
12
    /**
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...
13
     * @var string
14
     */
15
    protected $expression = '';
16
17
    /**
18
     * Expression constructor.
0 ignored issues
show
introduced by
Documentation comment contains forbidden comment "Expression constructor.".
Loading history...
19
     *
20
     * @param $expression
0 ignored issues
show
Coding Style introduced by
Missing parameter name
Loading history...
21
     */
22
    public function __construct($expression)
0 ignored issues
show
introduced by
Method \ClickHouseDB\Query\Expression::__construct() does not have parameter type hint nor @param annotation for its parameter $expression.
Loading history...
23
    {
24
        $this->expression = $expression;
25
    }
26
27
    /**
28
     * @return string
29
     */
30
    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...
31
    {
32
        return $this->expression;
33
    }
34
}