Skip to content

Commit 9b6a8e7

Browse files
foxycodedg
authored andcommitted
Selection: removed return types on aggregation functions (#166)
1 parent ff8f833 commit 9b6a8e7

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

src/Database/Table/GroupedSelection.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,10 @@ public function order(string $columns, ...$params)
8989
/********************* aggregations ****************d*g**/
9090

9191

92-
public function aggregation(string $function): int
92+
/**
93+
* @return mixed
94+
*/
95+
public function aggregation(string $function)
9396
{
9497
$aggregation = &$this->getRefTable($refPath)->aggregation[$refPath . $function . $this->sqlBuilder->getSelectQueryHash($this->getPreviousAccessedColumns())];
9598

src/Database/Table/Selection.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -462,8 +462,9 @@ public function alias(string $tableChain, string $alias)
462462
/**
463463
* Executes aggregation function.
464464
* @param string select call in "FUNCTION(column)" format
465+
* @return mixed
465466
*/
466-
public function aggregation(string $function): int
467+
public function aggregation(string $function)
467468
{
468469
$selection = $this->createSelectionInstance();
469470
$selection->getSqlBuilder()->importConditions($this->getSqlBuilder());
@@ -490,26 +491,29 @@ public function count(string $column = NULL): int
490491

491492
/**
492493
* Returns minimum value from a column.
494+
* @return mixed
493495
*/
494-
public function min(string $column): int
496+
public function min(string $column)
495497
{
496498
return $this->aggregation("MIN($column)");
497499
}
498500

499501

500502
/**
501503
* Returns maximum value from a column.
504+
* @return mixed
502505
*/
503-
public function max(string $column): int
506+
public function max(string $column)
504507
{
505508
return $this->aggregation("MAX($column)");
506509
}
507510

508511

509512
/**
510513
* Returns sum of values in a column.
514+
* @return mixed
511515
*/
512-
public function sum(string $column): int
516+
public function sum(string $column)
513517
{
514518
return $this->aggregation("SUM($column)");
515519
}

0 commit comments

Comments
 (0)