Оптимизации и исправления топов.

This commit is contained in:
CORP\phedor 2018-03-23 12:35:10 +03:00
parent 77fa3dbd5e
commit 0f4b2fb722
25 changed files with 109 additions and 53 deletions

View file

@ -58,17 +58,17 @@ class Collection implements ArrayAccess
public function getInt($key, $default = 0)
{
return intval($this->get($key, $default));
return (int)$this->get($key, $default);
}
public function getString($key, $default = '')
{
return ((string) $this->get($key, $default));
return (string)$this->get($key, $default);
}
public function getNat($key, $default = 1)
{
$result = intval($this->get($key, $default));
$result = (int)$this->get($key, $default);
return (($result > 0) ? $result : $default);
}