fix: phpstan level=6

This commit is contained in:
origami11@yandex.ru 2025-10-06 12:49:36 +03:00
parent acbf2c847d
commit 48269bd424
41 changed files with 324 additions and 347 deletions

View file

@ -11,19 +11,20 @@ class Time extends AbstractRule
{
private $split = ":";
public function getErrorMsg()
public function getErrorMsg(): string
{
return "Неверный формат времени";
}
static function checktime($hour, $minute)
static function checktime(int $hour, int $minute): bool
{
if ($hour > -1 && $hour < 24 && $minute > -1 && $minute < 60) {
return true;
}
return false;
}
public function isValid(Collection $container, $status = null)
public function isValid(Collection $container, $status = null): bool
{
/** @var list<string> */
$tmp = explode($this->split, $container->get($this->field), 2);