for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Yiisoft\Validator\Rule\Trait;
use function is_bool;
trait SkipOnEmptyTrait
{
public function skipOnEmpty(bool|callable|null $value): static
$new = clone $this;
$new->skipOnEmpty = $value;
skipOnEmpty
return $new;
}
public function getSkipOnEmpty(): bool|callable|null
return $this->skipOnEmpty;
private function getSkipOnEmptyOption(): bool
if (is_bool($this->skipOnEmpty)) {
return ! ($this->skipOnEmpty === null)
;