Remove unused method arguments

This commit is contained in:
snipe 2017-10-07 15:09:50 -07:00
parent d4e3ea1412
commit e29d878d4f
2 changed files with 10 additions and 10 deletions

View file

@ -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');
}

View file

@ -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');
}