This class seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate
the same code in three or more different places, we strongly encourage you to
look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.
Loading history...
14
{
15
use ChecksPermissions;
16
17
/**
18
* Determine if the user is authorized to make this request.
19
*
20
* @return bool
21
*/
22
public function authorize()
23
{
24
if ($this->hasPermissionTo('update-user')) return true;
25
if ($this->owns('user')) return true;
26
return false;
27
}
28
29
/**
30
* Get the validation rules that apply to the request.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.