- Minor enhancements
This commit is contained in:
1 parent
eb6434bb72
commit
cfaebbecc4
2 files changed
+7
-1
No files matched your search
+2
-1
@@ -56,7 +56,8 @@ abstract class Sql {
|
||||
$this->identifier = $identifier;
|
||||
}
|
||||
|
||||
public function __toString() {
|
||||
public function __toString() : string
|
||||
{
|
||||
return $this->identifier;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -222,6 +222,11 @@ class EntityCollection extends \ArrayObject {
|
||||
return $list;
|
||||
}
|
||||
|
||||
public function sum($field) : float|int
|
||||
{
|
||||
return array_sum($this->column($field));
|
||||
}
|
||||
|
||||
public function unique(\Stringable|callable|string $field, bool $strict = false) : self
|
||||
{
|
||||
$list = [];
|
||||
|
||||
Reference in new issue
Block a user