Last active
July 7, 2019 14:39
-
-
Save trikitrok/e5a538fc19f40e6309ea0d52a91729e3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace Trovit\B2B\AdClick\Domain; | |
| class ClickValidation | |
| { | |
| private $validators | |
| public function __construct(ClickValidator $noBotClickValidator) | |
| { | |
| $this->validators = [new ClickParamsValidator(), $noBotClickValidator]; | |
| } | |
| public function isValid(array $click) | |
| { | |
| foreach ($this->validators as $validator) { | |
| if (!$validator->isValid($click)) { | |
| return false; | |
| } | |
| } | |
| return true; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment