| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 21 | public function endpoint() |
||
|
|
|||
| 22 | { |
||
| 23 | $fu = new FineUploader(); |
||
| 24 | $destpath = storage_path('app/public/temp'); |
||
| 25 | if (! file_exists($destpath)) { |
||
| 26 | mkdir($destpath); |
||
| 27 | } |
||
| 28 | $res = $fu->handleUpload(storage_path('app/public/temp'), 'file'); |
||
| 29 | |||
| 30 | $res['ext'] = pathinfo($fu->getName(), PATHINFO_EXTENSION); |
||
| 31 | |||
| 32 | return json_encode($res); |
||
| 33 | } |
||
| 34 | } |
||
| 35 |
Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a
@returnannotation as described here.