cubiche /
bus
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
| 1 | <?php |
||
| 2 | |||
| 3 | /** |
||
| 4 | * This file is part of the Cubiche package. |
||
| 5 | * |
||
| 6 | * Copyright (c) Cubiche |
||
| 7 | * |
||
| 8 | * For the full copyright and license information, please view the LICENSE |
||
| 9 | * file that was distributed with this source code. |
||
| 10 | */ |
||
| 11 | |||
| 12 | namespace Cubiche\Core\Bus\Tests\Fixtures\Message; |
||
| 13 | |||
| 14 | use Cubiche\Core\Validator\Assert; |
||
| 15 | use Cubiche\Core\Validator\Exception\ValidationException; |
||
| 16 | use Cubiche\Core\Validator\Validator; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * UserMessageValidator class. |
||
| 20 | * |
||
| 21 | * @author Ivannis Suárez Jerez <[email protected]> |
||
| 22 | */ |
||
| 23 | class UserMessageValidator |
||
| 24 | { |
||
| 25 | /** |
||
| 26 | * @param LoginUserMessage $event |
||
| 27 | * |
||
| 28 | * @return bool |
||
| 29 | */ |
||
| 30 | public function loginUserValidator(LoginUserMessage $event) |
||
| 31 | { |
||
| 32 | Validator::assert($event->email(), Assert::email()->contains('gmail.com')); |
||
| 33 | } |
||
| 34 | |||
| 35 | /** |
||
| 36 | * @param LogoutUserMessage $event |
||
| 37 | * |
||
| 38 | * @return bool |
||
| 39 | */ |
||
| 40 | public function logoutUserValidator(LogoutUserMessage $event) |
||
|
0 ignored issues
–
show
|
|||
| 41 | { |
||
| 42 | throw new ValidationException('The email is invalid'); |
||
| 43 | } |
||
| 44 | } |
||
| 45 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.