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