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\IntBase;
use InputGuard\Guards\Bases\SingleInput;
class IntGuard implements Guard
{
use ErrorMessagesBase;
use IntBase;
use SingleInput;
public function __construct($input, ?int $default = null)
$this->input = $input;
$this->value = $default;
}
public function value(): ?int
$this->success();
return $this->value;