1 | <?php |
||
15 | class UpdateUserTask extends Task |
||
16 | { |
||
17 | |||
18 | /** |
||
19 | * @var \App\Containers\User\Contracts\UserRepositoryInterface |
||
20 | */ |
||
21 | private $userRepository; |
||
22 | |||
23 | /** |
||
24 | * UpdateUserTask constructor. |
||
25 | * |
||
26 | * @param \App\Containers\User\Contracts\UserRepositoryInterface $userRepository |
||
27 | */ |
||
28 | public function __construct(UserRepositoryInterface $userRepository) |
||
32 | |||
33 | /** |
||
34 | * @param $userId |
||
35 | * @param null $password |
||
36 | * @param null $name |
||
37 | * @param null $email |
||
38 | * @param null $gender |
||
39 | * @param null $birth |
||
40 | * @param null $token |
||
41 | * @param null $expiresIn |
||
42 | * @param null $refreshToken |
||
43 | * @param null $tokenSecret |
||
44 | * |
||
45 | * @return mixed |
||
46 | * @throws \App\Containers\Authentication\Exceptions\UpdateResourceFailedException |
||
47 | */ |
||
48 | public function run( |
||
84 | |||
85 | } |
||
86 |
This check marks implicit conversions of arrays to boolean values in a comparison. While in PHP an empty array is considered to be equal (but not identical) to false, this is not always apparent.
Consider making the comparison explicit by using
empty(..)
or! empty(...)
instead.