|
@@ 291-296 (lines=6) @@
|
| 288 |
|
foreach ($this->aggregations as $column => $aggregation_type) { |
| 289 |
|
switch ($aggregation_type) { |
| 290 |
|
case ColumnAggregationFunction::$aggregation_type_sum: |
| 291 |
|
case ColumnAggregationFunction::$aggregation_type_avg: |
| 292 |
|
if (!isset($result[$column])) { |
| 293 |
|
$result[$column] = 0; |
| 294 |
|
} |
| 295 |
|
$result[$column] += $row[$column]; |
| 296 |
|
break; |
| 297 |
|
case ColumnAggregationFunction::$aggregation_type_min: |
| 298 |
|
if (!isset($result[$column]) || $row[$column] < $result[$column]) { |
| 299 |
|
$result[$column] = $row[$column]; |
|
@@ 297-301 (lines=5) @@
|
| 294 |
|
} |
| 295 |
|
$result[$column] += $row[$column]; |
| 296 |
|
break; |
| 297 |
|
case ColumnAggregationFunction::$aggregation_type_min: |
| 298 |
|
if (!isset($result[$column]) || $row[$column] < $result[$column]) { |
| 299 |
|
$result[$column] = $row[$column]; |
| 300 |
|
} |
| 301 |
|
break; |
| 302 |
|
case ColumnAggregationFunction::$aggregation_type_max: |
| 303 |
|
if (!isset($result[$column]) || $row[$column] > $result[$column]) { |
| 304 |
|
$result[$column] = $row[$column]; |
|
@@ 302-306 (lines=5) @@
|
| 299 |
|
$result[$column] = $row[$column]; |
| 300 |
|
} |
| 301 |
|
break; |
| 302 |
|
case ColumnAggregationFunction::$aggregation_type_max: |
| 303 |
|
if (!isset($result[$column]) || $row[$column] > $result[$column]) { |
| 304 |
|
$result[$column] = $row[$column]; |
| 305 |
|
} |
| 306 |
|
break; |
| 307 |
|
} |
| 308 |
|
} |
| 309 |
|
} |