| Total Complexity | 8 | 
| Total Lines | 101 | 
| Duplicated Lines | 0 % | 
| Changes | 0 | ||
| 1 | <?php  | 
            ||
| 9 | class Event implements JsonSerializable  | 
            ||
| 10 | { | 
            ||
| 11 | use Jsonable;  | 
            ||
| 12 | |||
| 13 | /**  | 
            ||
| 14 | * @var array  | 
            ||
| 15 | */  | 
            ||
| 16 | protected $properties;  | 
            ||
| 17 | /**  | 
            ||
| 18 | * @var string  | 
            ||
| 19 | */  | 
            ||
| 20 | protected $email;  | 
            ||
| 21 | /**  | 
            ||
| 22 | * @var string  | 
            ||
| 23 | */  | 
            ||
| 24 | protected $action;  | 
            ||
| 25 | /**  | 
            ||
| 26 | * @var DateTime  | 
            ||
| 27 | */  | 
            ||
| 28 | protected $occurred_at;  | 
            ||
| 29 | |||
| 30 | /**  | 
            ||
| 31 | * @param $key  | 
            ||
| 32 | * @param $value  | 
            ||
| 33 | *  | 
            ||
| 34 | * @return Event  | 
            ||
| 35 | */  | 
            ||
| 36 | public function addProperty($key, $value): self  | 
            ||
| 37 |     { | 
            ||
| 38 | $this->properties[$key] = $value;  | 
            ||
| 39 | |||
| 40 | return $this;  | 
            ||
| 41 | }  | 
            ||
| 42 | |||
| 43 | /**  | 
            ||
| 44 | * @param $key  | 
            ||
| 45 | *  | 
            ||
| 46 | * @return Event  | 
            ||
| 47 | */  | 
            ||
| 48 | public function removeProperty($key): self  | 
            ||
| 49 |     { | 
            ||
| 50 |         if (!empty($this->properties[$key])) { | 
            ||
| 51 | unset($this->properties[$key]);  | 
            ||
| 52 | }  | 
            ||
| 53 | |||
| 54 | return $this;  | 
            ||
| 55 | }  | 
            ||
| 56 | |||
| 57 | /**  | 
            ||
| 58 | * @param array $properties  | 
            ||
| 59 | *  | 
            ||
| 60 | * @return Event  | 
            ||
| 61 | */  | 
            ||
| 62 | public function setProperties(array $properties): self  | 
            ||
| 63 |     { | 
            ||
| 64 | $this->properties = $properties;  | 
            ||
| 65 | |||
| 66 | return $this;  | 
            ||
| 67 | }  | 
            ||
| 68 | |||
| 69 | /**  | 
            ||
| 70 | * @param string $email  | 
            ||
| 71 | *  | 
            ||
| 72 | * @return Event  | 
            ||
| 73 | */  | 
            ||
| 74 | public function setEmail(string $email): self  | 
            ||
| 75 |     { | 
            ||
| 76 | $this->email = $email;  | 
            ||
| 77 | |||
| 78 | return $this;  | 
            ||
| 79 | }  | 
            ||
| 80 | |||
| 81 | /**  | 
            ||
| 82 | * @param string $action  | 
            ||
| 83 | *  | 
            ||
| 84 | * @return Event  | 
            ||
| 85 | */  | 
            ||
| 86 | public function setAction(string $action): self  | 
            ||
| 91 | }  | 
            ||
| 92 | |||
| 93 | /**  | 
            ||
| 94 | * @param DateTime $occurredAt  | 
            ||
| 95 | *  | 
            ||
| 96 | * @return Event  | 
            ||
| 97 | */  | 
            ||
| 98 | public function setOccurredAt(DateTime $occurredAt): self  | 
            ||
| 103 | }  | 
            ||
| 104 | |||
| 105 | public function toDrip(): array  | 
            ||
| 106 |     { | 
            ||
| 107 | return [  | 
            ||
| 114 |