for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* This file is part of the Cubiche package.
*
* Copyright (c) Cubiche
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Cubiche\Core\Bus\Tests\Fixtures\Message;
use Cubiche\Core\Validator\Assert;
use Cubiche\Core\Validator\Exception\ValidationException;
use Cubiche\Core\Validator\Validator;
* UserMessageValidator class.
* @author Ivannis Suárez Jerez <[email protected]>
class UserMessageValidator
{
* @param LoginUserMessage $event
* @return bool
public function loginUserValidator(LoginUserMessage $event)
Validator::assert($event->email(), Assert::email()->contains('gmail.com'));
}
* @param LogoutUserMessage $event
public function logoutUserValidator(LogoutUserMessage $event)
$event
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.
throw new ValidationException('The email is invalid');
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.