Conditions | 8 |
Paths | 3 |
Total Lines | 15 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
17 | public function update($input) { |
||
18 | $local = $this->local; |
||
19 | $valid = parent::update($input); |
||
20 | if($valid && !(is_null($this->min) && is_null($this->max))) { |
||
21 | $numeric_local = (int) eval('return ' . $this->local . ';'); |
||
22 | if((!is_null($this->min) && $numeric_local < $this->min) || |
||
23 | (!is_null($this->max) && $numeric_local > $this->max)) { |
||
24 | $this->error = true; |
||
25 | $this->input = $input; |
||
26 | $this->local = $local; |
||
27 | $valid = false; |
||
28 | } |
||
29 | } |
||
30 | return $valid; |
||
31 | } |
||
32 | |||
43 |