Completed
Push — master ( b8e5b9...5c4867 )
by Jan
03:08
created

Between::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 2
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
declare(strict_types=1);
3
4
namespace Kontrolio\Rules\Core;
5
6
use Kontrolio\Rules\AbstractRule;
7
8
final class Between extends AbstractRule
9
{
10
    private $min;
11
    private $max;
12
13
    public function __construct($min, $max)
14
    {
15
        $this->min = $min;
16
        $this->max = $max;
17
    }
18
    
19
    public function isValid($input = null)
20
    {
21
        return (new GreaterThan($this->min))->isValid($input) &&
22
               (new LessThan($this->max))->isValid($input);
23
    }
24
}
25