for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace KGzocha\Searcher\Criteria;
/**
* @author Krzysztof Gzocha <[email protected]>
*/
class IntegerRangeCriteria implements CriteriaInterface
{
* @var int
private $min;
private $max;
* @param int|null $min
* @param int|null $max
public function __construct(int $min = null, int $max = null)
$this->min = $min;
$this->max = $max;
}
* @return int|null
public function getMin()
return $this->min;
* @param int $min
public function setMin(int $min = null)
* @return int
public function getMax()
return $this->max;
* @param int $max
public function setMax(int $max = null)
* {@inheritdoc}
public function shouldBeApplied(): bool
return $this->min !== null && $this->max !== null;