fix: phpstan level=3

This commit is contained in:
origami11@yandex.ru 2024-01-22 14:00:52 +03:00
parent bbc9d0e7fe
commit f594611656
6 changed files with 8 additions and 6 deletions

View file

@ -104,7 +104,7 @@ class Action
* @param string $viewClass
* @return Composite
*/
public function getView($name, $viewClass = 'ctiso\\View\\Composite')
public function getView($name, $viewClass = Composite::class)
{
$file = $name . self::TEMPLATE_EXTENSION;

View file

@ -2,5 +2,6 @@
namespace ctiso\Model;
class BaseMapper {
abstract class BaseMapper {
abstract function getAllAsOptions(): array;
}

View file

@ -31,7 +31,7 @@ class User implements UserInterface
}
function isLogged() {
return \ctiso\Filter\Authorization::isLogged();
return \ctiso\Filter\Authorization::isLogged();
}
@ -41,7 +41,7 @@ class User implements UserInterface
if ($result->next()) {
$this->access = $this->groups[$result->getString('access')];
$this->name = $result->getString('login');
$this->id = $result->getInt('id_user');
$this->id = $result->getInt('id_user');
$this->password = $result->getString('password');
$this->fullname = implode(' ', array(
$result->getString('surname'),

View file

@ -91,7 +91,7 @@ class Validator
if ($rule->skipEmpty()) {
$data = $container->get($rule->field);
if (!is_array($data)) {
$value = trim($data);
$value = trim($data ?: '');
return $value == '';
}
}

View file

@ -8,6 +8,7 @@ namespace ctiso\View;
use ctiso\View\View,
PHPTAL;
class Composite extends View
{
private $tal;

View file

@ -3,7 +3,7 @@
namespace ctiso\View;
use Exception;
class View
class View extends \stdClass
{
protected $_section = array(); // Вложенные шаблоны
// Блоки