| 1 | <?php |
||
| 14 | class UpdateUserService extends Service |
||
| 15 | { |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @var \App\Containers\User\Contracts\UserRepositoryInterface |
||
| 19 | */ |
||
| 20 | private $userRepository; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * UpdateUserAction constructor. |
||
| 24 | * |
||
| 25 | * @param \App\Containers\User\Contracts\UserRepositoryInterface $userRepository |
||
| 26 | */ |
||
| 27 | public function __construct(UserRepositoryInterface $userRepository) |
||
| 31 | |||
| 32 | |||
| 33 | /** |
||
| 34 | * @param $userId |
||
| 35 | * @param null $password |
||
| 36 | * @param null $name |
||
| 37 | * @param null $email |
||
| 38 | * |
||
| 39 | * @return mixed |
||
| 40 | */ |
||
| 41 | public function run($userId, $password = null, $name = null, $email = null) |
||
| 67 | |||
| 68 | |||
| 69 | } |
||
| 70 |
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.