It is generally recommended to explicitly declare the visibility for methods.
Adding explicit visibility (private, protected, or public) is generally
recommend to communicate to other developers how, and from where this method
is intended to be used.
Loading history...
38
{
39
$this->user = $user;
40
$this->code = $code;
41
}
42
43
/**
44
* Handle the command.
45
*
46
* @param UserRepositoryInterface $users
47
* @return bool
48
*/
49
public function handle(UserRepositoryInterface $users)
50
{
51
if (!$user = $users->findByActivationCode($this->code)) {
Accessing activated on the interface Anomaly\UsersModule\User\Contract\UserInterface suggest that you code against a concrete implementation. How about adding an instanceof check?
If you access a property on an interface, you most likely code against a
concrete implementation of the interface.
Accessing activation_code on the interface Anomaly\UsersModule\User\Contract\UserInterface suggest that you code against a concrete implementation. How about adding an instanceof check?
If you access a property on an interface, you most likely code against a
concrete implementation of the interface.
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.