Conditions | 3 |
Paths | 3 |
Total Lines | 26 |
Code Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
25 | public function isValid() |
||
26 | { |
||
27 | if ($this->isNotRequiredAndEmpty()) { |
||
28 | return true; |
||
29 | } |
||
30 | |||
31 | $values = explode(',', $this->getParams()[2]); |
||
32 | |||
33 | $input = trim($this->getParams()[1]); |
||
34 | |||
35 | $between = $this->Between( |
||
36 | trim($values[0]), // min |
||
37 | trim($values[1]), // max |
||
38 | true // inclusive |
||
39 | ); |
||
40 | |||
41 | if ($this->hasRule('numeric') !== false) { |
||
42 | $this->isNumeric = true; |
||
43 | |||
44 | return $between->validate($input); |
||
45 | } |
||
46 | |||
47 | $input = mb_strlen($input); |
||
48 | |||
49 | return $between->validate($input); |
||
50 | } |
||
51 | |||
66 |
This check marks private properties in classes that are never used. Those properties can be removed.