| Conditions | 4 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 20 |
| Changes | 3 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 63 | public function saveUploadedFile($event) |
||
|
|
|||
| 64 | { |
||
| 65 | $model = $this->owner; |
||
| 66 | $arr_ids = []; |
||
| 67 | if (in_array($model->scenario, $this->scenarios, true)) { |
||
| 68 | $this->_file = UploadedFile::getInstances($model, $this->attribute); |
||
| 69 | if (is_array($this->_file) && !empty($this->_file)) { |
||
| 70 | $this->owner->{$this->savedAttribute} = implode(',', FileModel::fileSave($this->_file)); |
||
| 71 | } else { |
||
| 72 | // Protect attribute |
||
| 73 | unset($model->{$this->attribute}); |
||
| 74 | } |
||
| 75 | } |
||
| 76 | } |
||
| 77 | } |
||
| 78 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.