| Total Complexity | 8 |
| Total Lines | 47 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 4 | class CountBetween implements ConditionInterface |
||
| 5 | { |
||
| 6 | /** |
||
| 7 | * @var int |
||
| 8 | */ |
||
| 9 | protected $from; |
||
| 10 | |||
| 11 | /** |
||
| 12 | * @var int |
||
| 13 | */ |
||
| 14 | protected $to; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @var bool |
||
| 18 | */ |
||
| 19 | protected $inclusive = false; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * CountBetween constructor. |
||
| 23 | * |
||
| 24 | * @param int $from |
||
| 25 | * @param int $to |
||
| 26 | * @param bool $inclusive |
||
| 27 | */ |
||
| 28 | 7 | public function __construct(int $from, int $to, bool $inclusive = false) |
|
| 29 | { |
||
| 30 | 7 | $this->from = $from; |
|
| 31 | 7 | $this->to = $to; |
|
| 32 | 7 | $this->inclusive = $inclusive; |
|
| 33 | 7 | } |
|
| 34 | |||
| 35 | /** |
||
| 36 | * @param int $value |
||
| 37 | * |
||
| 38 | * @return bool |
||
| 39 | */ |
||
| 40 | 7 | public function shouldRun($value) |
|
| 51 | } |
||
| 52 | } |
||
| 53 |