- Minor enhancements
This commit is contained in:
parent
eb6434bb72
commit
cfaebbecc4
|
@ -56,7 +56,8 @@ abstract class Sql {
|
||||||
$this->identifier = $identifier;
|
$this->identifier = $identifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function __toString() {
|
public function __toString() : string
|
||||||
|
{
|
||||||
return $this->identifier;
|
return $this->identifier;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -222,6 +222,11 @@ class EntityCollection extends \ArrayObject {
|
||||||
return $list;
|
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
|
public function unique(\Stringable|callable|string $field, bool $strict = false) : self
|
||||||
{
|
{
|
||||||
$list = [];
|
$list = [];
|
||||||
|
|
Loading…
Reference in New Issue