| Total Complexity | 8 |
| Total Lines | 67 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | class MailChimpWebHooksSources implements \JsonSerializable |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @var bool |
||
| 11 | */ |
||
| 12 | private $api; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @var bool |
||
| 16 | */ |
||
| 17 | private $admin; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @var bool |
||
| 21 | */ |
||
| 22 | private $subscriber; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * MailChimpWebHooksSources constructor. |
||
| 26 | */ |
||
| 27 | public function __construct() |
||
| 28 | { |
||
| 29 | $this->setApi(true); |
||
| 30 | $this->setAdmin(true); |
||
| 31 | $this->setSubscriber(true); |
||
| 32 | } |
||
| 33 | |||
| 34 | public function jsonSerialize() |
||
| 40 | ]; |
||
| 41 | } |
||
| 42 | |||
| 43 | public function isApi(): bool |
||
| 44 | { |
||
| 45 | return $this->api; |
||
| 46 | } |
||
| 47 | |||
| 48 | public function setApi(bool $api): MailChimpWebHooksSources |
||
| 49 | { |
||
| 50 | $this->api = $api; |
||
| 51 | return $this; |
||
| 52 | } |
||
| 53 | |||
| 54 | public function isAdmin(): bool |
||
| 57 | } |
||
| 58 | |||
| 59 | public function setAdmin(bool $admin): MailChimpWebHooksSources |
||
| 60 | { |
||
| 61 | $this->admin = $admin; |
||
| 62 | return $this; |
||
| 63 | } |
||
| 64 | |||
| 65 | public function isSubscriber(): bool |
||
| 66 | { |
||
| 67 | return $this->subscriber; |
||
| 68 | } |
||
| 69 | |||
| 70 | public function setSubscriber(bool $subscriber): MailChimpWebHooksSources |
||
| 74 | } |
||
| 75 | } |
||
| 76 |