fix: phpstan level=3
This commit is contained in:
parent
bbc9d0e7fe
commit
f594611656
6 changed files with 8 additions and 6 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -2,5 +2,6 @@
|
|||
|
||||
namespace ctiso\Model;
|
||||
|
||||
class BaseMapper {
|
||||
abstract class BaseMapper {
|
||||
abstract function getAllAsOptions(): array;
|
||||
}
|
||||
|
|
@ -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'),
|
||||
|
|
|
|||
|
|
@ -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 == '';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ namespace ctiso\View;
|
|||
use ctiso\View\View,
|
||||
PHPTAL;
|
||||
|
||||
|
||||
class Composite extends View
|
||||
{
|
||||
private $tal;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
namespace ctiso\View;
|
||||
use Exception;
|
||||
|
||||
class View
|
||||
class View extends \stdClass
|
||||
{
|
||||
protected $_section = array(); // Вложенные шаблоны
|
||||
// Блоки
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue