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

@ -5,43 +5,43 @@ use ctiso\Collection;
abstract class AbstractRule
{
public $field;
public string $field;
protected $errorMsg;
protected $ctx;
public function __construct($field, $errorMsg = null)
public function __construct(string $field, $errorMsg = null)
{
$this->field = $field;
$this->errorMsg = $errorMsg;
}
public function setName($field)
public function setName(string $field): self
{
$this->field = $field;
return $this;
}
public function setErrorMsg($errorMsg)
public function setErrorMsg($errorMsg): self
{
$this->errorMsg = $errorMsg;
return $this;
}
public function getErrorMsg()
{
public function getErrorMsg(): string
{
return $this->errorMsg;
}
public function isValid(Collection $container, $status = null)
public function isValid(Collection $container, $status = null): bool
{
return true;
}
function skipEmpty() {
function skipEmpty(): bool {
return true;
}
public function setContext($ctx)
public function setContext($ctx): void
{
$this->ctx = $ctx;
}