| Conditions | 2 | 
| Paths | 2 | 
| Total Lines | 15 | 
| Code Lines | 9 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Tests | 0 | 
| CRAP Score | 6 | 
| Changes | 0 | ||
| 1 | <?php  | 
            ||
| 26 | public function show($device_id)  | 
            ||
| 27 |     { | 
            ||
| 28 |         $storagePath = storage_path('app/images/devices/'); | 
            ||
| 29 | $imagePath = glob($storagePath . $device_id . "*" . ".jpg");  | 
            ||
| 30 | |||
| 31 | if ($imagePath)  | 
            ||
| 32 | $image = Image::make($imagePath[0]);  | 
            ||
| 33 | else  | 
            ||
| 34 |         { | 
            ||
| 35 | $imagePath = public_path() . '/img/video_not_found.jpg';  | 
            ||
| 36 | $image = Image::make($imagePath);  | 
            ||
| 37 | }  | 
            ||
| 38 | |||
| 39 | return $image->response();  | 
            ||
| 40 | }  | 
            ||
| 41 | |||
| 56 | 
Adding a
@returnannotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.