| 1 | <?php namespace App\Modules\V1\Core\Utl; |
||
| 3 | class Media |
||
| 4 | { |
||
| 5 | /** |
||
| 6 | * Upload the given image. |
||
| 7 | * |
||
| 8 | * @param object $image |
||
| 9 | * @param string $dir |
||
| 10 | * @return string |
||
| 11 | */ |
||
| 12 | public function uploadImage($image, $dir) |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Upload the given image. |
||
| 27 | * |
||
| 28 | * @param object $image |
||
| 29 | * @param string $dir |
||
| 30 | * @return string |
||
| 31 | */ |
||
| 32 | public function uploadImageBas64($image, $dir) |
||
| 46 | |||
| 47 | /** |
||
| 48 | * Delete the given image. |
||
| 49 | * |
||
| 50 | * @param object $path |
||
| 51 | * @param string $dir |
||
| 52 | * @return void |
||
| 53 | */ |
||
| 54 | public function deleteImage($path, $dir) |
||
| 63 | } |
||
| 64 |
This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.
Both the
$myVarassignment in line 1 and the$higherassignment in line 2 are dead. The first because$myVaris never used and the second because$higheris always overwritten for every possible time line.