Total Complexity | 5 |
Total Lines | 43 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
8 | class Subscriber implements SubscriberContract |
||
9 | { |
||
10 | /** |
||
11 | * @var string |
||
12 | */ |
||
13 | private $event; |
||
14 | /** |
||
15 | * @var string |
||
16 | */ |
||
17 | private $url; |
||
18 | /** |
||
19 | * @var bool |
||
20 | */ |
||
21 | private $enabled; |
||
22 | |||
23 | public function __construct(string $event, string $url, bool $enabled = true) |
||
24 | { |
||
25 | $this->event = $event; |
||
26 | $this->url = $url; |
||
27 | $this->enabled = $enabled; |
||
28 | } |
||
29 | |||
30 | public function event(): string |
||
31 | { |
||
32 | return $this->event; |
||
33 | } |
||
34 | |||
35 | public function url(): string |
||
36 | { |
||
37 | return $this->url; |
||
38 | } |
||
39 | |||
40 | public function isEnabled(): bool |
||
43 | } |
||
44 | |||
45 | public function toArray(): array |
||
51 | ]; |
||
52 | } |
||
53 | } |
||
54 |