Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 2.0438 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
34 | 6 | public function __construct($func, $column, $alias = '') { |
|
35 | 6 | $format = '%1$s(%2$s) as %3$s'; |
|
36 | 6 | if ($func === static::COUNT_DISTINCT) { |
|
37 | $format = '%1$s(distinct %2$s) as %3$s'; |
||
38 | $func = static::COUNT; |
||
39 | } |
||
40 | |||
41 | 6 | parent::__construct($format); |
|
42 | |||
43 | 6 | $this->func = $func; |
|
44 | 6 | $this->column = $column; |
|
45 | 6 | $this->alias = $alias; |
|
46 | 6 | } |
|
60 |