This method 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.
The method dd() does not seem to exist on object<Tinyissue\Policies\UserPolicy>.
This check looks for calls to methods that do not seem to exist on a given type.
It looks for the method on the type itself as well as in inherited classes or
implemented interfaces.
This is most likely a typographical error or the method has been renamed.
Loading history...
30
if ($user instanceof UserInterface && ($user->isAdmin() || $user->isManager())) {
31
return true;
32
}
33
}
34
35
/**
36
* Determine if the given user can manages administrator area.
37
*
38
* @param User $user
39
*
40
* @return bool
41
*/
42
public function viewName(User $loggedUser, User $user)
43
{
44
if (!$user->private || (int)$loggedUser->id === (int)$user->id) {
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.