for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace PTS\Validator\Validators;
class RequiredValidator
{
public function __invoke($value): bool
if ($value === null) {
return false;
}
if (is_string($value) && trim($value) === '') {
if ((is_array($value) || $value instanceof \Countable) && count($value) < 1) {
if
return
return !((is_array($valu... && count($value) < 1);
return true;