Total Complexity | 8 |
Total Lines | 50 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
9 | class Validator |
||
10 | { |
||
11 | use ActionEventTrait; |
||
|
|||
12 | |||
13 | private Setting $setting; |
||
14 | |||
15 | private Event $event; |
||
16 | |||
17 | public function __construct(Setting $setting, Event $event) |
||
18 | { |
||
19 | $this->setting = $setting; |
||
20 | $this->event = $event; |
||
21 | } |
||
22 | |||
23 | /** |
||
24 | * Validate is access event before send notify |
||
25 | * |
||
26 | * @param string $platform Source code platform (GitHub, GitLab) |
||
27 | * @param string $event Event name (push, pull_request) |
||
28 | * @param object $payload |
||
29 | * |
||
30 | * @return bool |
||
31 | */ |
||
32 | public function isAccessEvent( |
||
59 | } |
||
60 | } |
||
61 |