From 5a53207b130ff644f4ddde0e248184490220c2f4 Mon Sep 17 00:00:00 2001 From: Stream Date: Wed, 20 Mar 2024 14:37:27 +0800 Subject: [PATCH] style: controller methods and route names should be camelCase --- src/Controllers/CropController.php | 4 ++-- src/Controllers/ItemsController.php | 2 +- src/Lfm.php | 12 ++++++------ 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Controllers/CropController.php b/src/Controllers/CropController.php index a78e4113..3c7ed69e 100644 --- a/src/Controllers/CropController.php +++ b/src/Controllers/CropController.php @@ -25,7 +25,7 @@ public function getCrop() /** * Crop the image (called via ajax). */ - public function getCropimage($overWrite = true) + public function getCropImage($overWrite = true) { $image_name = request('img'); $image_path = $this->lfm->setName($image_name)->path('absolute'); @@ -52,7 +52,7 @@ public function getCropimage($overWrite = true) event(new ImageWasCropped($image_path)); } - public function getNewCropimage() + public function getNewCropImage() { $this->getCropimage(false); } diff --git a/src/Controllers/ItemsController.php b/src/Controllers/ItemsController.php index a32576a2..c6bede7d 100644 --- a/src/Controllers/ItemsController.php +++ b/src/Controllers/ItemsController.php @@ -58,7 +58,7 @@ public function move() ->with('items', $items); } - public function domove() + public function doMove() { $target = $this->helper->input('goToFolder'); $items = $this->helper->input('items'); diff --git a/src/Lfm.php b/src/Lfm.php index bd07d8b8..3cae39ae 100644 --- a/src/Lfm.php +++ b/src/Lfm.php @@ -319,8 +319,8 @@ public static function routes() ]); Route::get('/domove', [ - 'uses' => 'ItemsController@domove', - 'as' => 'domove' + 'uses' => 'ItemsController@doMove', + 'as' => 'doMove' ]); // folders @@ -341,12 +341,12 @@ public static function routes() 'as' => 'getCrop', ]); Route::get('/cropimage', [ - 'uses' => 'CropController@getCropimage', - 'as' => 'getCropimage', + 'uses' => 'CropController@getCropImage', + 'as' => 'getCropImage', ]); Route::get('/cropnewimage', [ - 'uses' => 'CropController@getNewCropimage', - 'as' => 'getCropnewimage', + 'uses' => 'CropController@getNewCropImage', + 'as' => 'getNewCropImage', ]); // rename