Conditions | 5 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 5 |
Changes | 0 |
1 | <?php |
||
20 | 5 | public function validate($value, $valueIdentifier = null) |
|
21 | { |
||
22 | 5 | $this->value = $value; |
|
23 | 5 | if (! is_array($value) || ! isset($value['tmp_name']) || ! file_exists($value['tmp_name']) || $value['error'] !== UPLOAD_ERR_OK) { |
|
24 | 3 | $this->success = false; |
|
25 | 3 | } else { |
|
26 | 2 | $this->success = true; |
|
27 | } |
||
28 | |||
29 | 5 | return $this->success; |
|
30 | } |
||
31 | } |