From 9cc53f9cbfe6cbf307afe91ea294e60b8285d0ce Mon Sep 17 00:00:00 2001 From: Jonny Barnes Date: Sat, 17 Oct 2020 10:40:33 +0100 Subject: [PATCH] Some phpcs tweaks --- app/Http/Controllers/Admin/PlacesController.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/Admin/PlacesController.php b/app/Http/Controllers/Admin/PlacesController.php index e72a1272..e30d32f6 100644 --- a/app/Http/Controllers/Admin/PlacesController.php +++ b/app/Http/Controllers/Admin/PlacesController.php @@ -48,8 +48,14 @@ class PlacesController extends Controller */ public function store(): RedirectResponse { - $data = request()->only(['name', 'description', 'latitude', 'longitude']); - $place = $this->placeService->createPlace($data); + $this->placeService->createPlace( + request()->only([ + 'name', + 'description', + 'latitude', + 'longitude' + ]) + ); return redirect('/admin/places'); } @@ -95,7 +101,7 @@ class PlacesController extends Controller public function mergeIndex(int $placeId): View { $first = Place::find($placeId); - $results = Place::near((object) ['latitude' => $first->latitude, 'longitude' =>$first->longitude])->get(); + $results = Place::near((object) ['latitude' => $first->latitude, 'longitude' => $first->longitude])->get(); $places = []; foreach ($results as $place) { if ($place->slug !== $first->slug) {