| 1 | <?php |
||
| 15 | class Aggregate extends Literal { |
||
| 16 | const AVG = 'avg'; |
||
|
|
|||
| 17 | const COUNT = 'count'; |
||
| 18 | const MAX = 'max'; |
||
| 19 | const MIN = 'min'; |
||
| 20 | const SUM = 'sum'; |
||
| 21 | |||
| 22 | private $func; |
||
| 23 | private $column; |
||
| 24 | private $alias; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Construct an {@link Aggregate} object. |
||
| 28 | * |
||
| 29 | * @param string $func The name of the aggregate function. Use one of the **Aggregate::*** constants. |
||
| 30 | * @param string $column The name of the column to aggregate. |
||
| 31 | * @param string $alias The alias of the aggregate. If left out then the function name will be used as the alias. |
||
| 32 | */ |
||
| 33 | 2 | public function __construct($func, $column, $alias = '') { |
|
| 40 | |||
| 41 | /** |
||
| 42 | * {@inheritdoc} |
||
| 43 | */ |
||
| 44 | 2 | public function getValue(Db $db, ...$args) { |
|
| 52 | } |
||
| 53 |
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.
To visualize
will produce issues in the first and second line, while this second example
will produce no issues.