From e29d878d4f4db719c519bcab082fad611f5596a3 Mon Sep 17 00:00:00 2001 From: snipe Date: Sat, 7 Oct 2017 15:09:50 -0700 Subject: [PATCH] Remove unused method arguments --- app/Policies/CategoryPolicy.php | 10 +++++----- app/Policies/LocationPolicy.php | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/app/Policies/CategoryPolicy.php b/app/Policies/CategoryPolicy.php index 94a39d0c08..a0b0c095d4 100644 --- a/app/Policies/CategoryPolicy.php +++ b/app/Policies/CategoryPolicy.php @@ -12,7 +12,7 @@ class CategoryPolicy use HandlesAuthorization; - public function before(User $user, $ability, $category) + public function before(User $user, $category) { // Lets move all company related checks here. if ($category instanceof \App\Models\Category && !Company::isCurrentUserHasAccess($category)) { @@ -30,7 +30,7 @@ class CategoryPolicy * @param \App\Category $category * @return mixed */ - public function view(User $user, Category $category = null) + public function view(User $user) { return $user->hasAccess('categories.view'); } @@ -53,7 +53,7 @@ class CategoryPolicy * @param \App\Category $category * @return mixed */ - public function update(User $user, Category $category = null) + public function update(User $user) { // return $user->hasAccess('categories.edit'); @@ -66,7 +66,7 @@ class CategoryPolicy * @param \App\Category $category * @return mixed */ - public function delete(User $user, Category $category = null) + public function delete(User $user) { // return $user->hasAccess('categories.delete'); @@ -92,7 +92,7 @@ class CategoryPolicy * @param \App\Models\Category $category * @return mixed */ - public function manage(User $user, Category $category = null) + public function manage(User $user) { return $user->hasAccess('categories.edit'); } diff --git a/app/Policies/LocationPolicy.php b/app/Policies/LocationPolicy.php index f96c6d5d48..dddc82f4ca 100644 --- a/app/Policies/LocationPolicy.php +++ b/app/Policies/LocationPolicy.php @@ -12,7 +12,7 @@ class LocationPolicy use HandlesAuthorization; - public function before(User $user, $ability, $location) + public function before(User $user, $location) { // Lets move all company related checks here. if ($location instanceof \App\Models\Location && !Company::isCurrentUserHasAccess($location)) { @@ -30,7 +30,7 @@ class LocationPolicy * @param \App\Models\Location $location * @return mixed */ - public function view(User $user, Location $location = null) + public function view(User $user) { return $user->hasAccess('locations.view'); } @@ -53,7 +53,7 @@ class LocationPolicy * @param \App\Models\Location $location * @return mixed */ - public function update(User $user, Location $location = null) + public function update(User $user) { // return $user->hasAccess('locations.edit'); @@ -66,7 +66,7 @@ class LocationPolicy * @param \App\Models\Location $location * @return mixed */ - public function delete(User $user, Location $location = null) + public function delete(User $user) { // return $user->hasAccess('locations.delete'); @@ -92,7 +92,7 @@ class LocationPolicy * @param \App\Models\Location $location * @return mixed */ - public function manage(User $user, Location $location = null) + public function manage(User $user) { return $user->hasAccess('locations.edit'); }