| Conditions | 3 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 4 |
| CRAP Score | 3.3332 |
| Changes | 0 | ||
| 1 | <?php |
||
| 44 | 1 | public function setFile(UploadedFile $file = null): Picture |
|
| 45 | { |
||
| 46 | 1 | $this->file = $file; |
|
| 47 | // check if we have an old image path |
||
| 48 | 1 | if ($this->file !== null && is_file($this->getAbsolutePath())) { |
|
| 49 | // store the old name to delete after the update |
||
| 50 | $this->temp = $this->getAbsolutePath(); |
||
| 51 | $this->path = null; |
||
| 52 | } |
||
| 53 | 1 | return $this; |
|
| 54 | } |
||
| 90 | } |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths