fix: phpstan level=6
This commit is contained in:
parent
acbf2c847d
commit
48269bd424
41 changed files with 324 additions and 347 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue