for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace InputGuard\Guards;
use InputGuard\Guards\Bases\SingleIterableInput;
class IterableGuard implements Guard
{
use ErrorMessagesBase;
use SingleIterableInput;
public function __construct($input, ?iterable $default = null)
$this->input = $input;
$this->value = $default;
}
protected function validateIterableElement($element, &$value): bool
$value = $element;
return true;