Conditions | 4 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 4 |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
51 | 3 | public function offsetSet($offset, $value) |
|
52 | { |
||
53 | // attempts to add invalid file in a filebag er ignored |
||
54 | 3 | if (is_a($value, 'Fracture\Http\UploadedFile') === true && |
|
55 | 3 | $value->isValid() === false) { |
|
56 | 1 | return; |
|
57 | } |
||
58 | |||
59 | 2 | if (is_null($offset) === true) { |
|
60 | 1 | $this->entries[] = $value; |
|
61 | } else { |
||
62 | 1 | $this->entries[$offset] = $value; |
|
63 | } |
||
64 | 2 | } |
|
65 | |||
82 |