Conditions | 5 |
Paths | 6 |
Total Lines | 20 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
19 | public function prepare(UploadedFile $image = null) |
||
20 | { |
||
21 | if (is_null($image)) { |
||
22 | if ($this->isDeleteRequest()) { |
||
23 | return ''; |
||
24 | } |
||
25 | |||
26 | return $this->original; |
||
27 | } |
||
28 | |||
29 | $this->directory = $this->directory ?: $this->defaultStorePath(); |
||
30 | |||
31 | $this->name = $this->name ?: $image->getClientOriginalName(); |
||
32 | |||
33 | $target = $this->uploadAndDeleteOriginal($image); |
||
34 | |||
35 | $target = $this->executeCalls($target); |
||
36 | |||
37 | return $target; |
||
38 | } |
||
39 | |||
80 |