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

Expression::__toString()   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 0
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
 * 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
}