Total Complexity | 6 |
Total Lines | 59 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
21 | class Event implements EventInterface |
||
22 | { |
||
23 | /** |
||
24 | * @var Domain |
||
25 | */ |
||
26 | private $domain; |
||
27 | |||
28 | /** |
||
29 | * @var Name |
||
30 | */ |
||
31 | private $name; |
||
32 | |||
33 | /** |
||
34 | * @var CreatedAt |
||
35 | */ |
||
36 | private $createdAt; |
||
37 | |||
38 | /** |
||
39 | * @var Version |
||
40 | */ |
||
41 | private $version; |
||
42 | |||
43 | /** |
||
44 | * @var array |
||
45 | */ |
||
46 | private $data; |
||
47 | |||
48 | public function __construct(Domain $domain, Name $name, CreatedAt $createdAt, Version $version, array $data) |
||
49 | { |
||
50 | $this->domain = $domain; |
||
51 | $this->createdAt = $createdAt; |
||
52 | $this->version = $version; |
||
53 | $this->data = $data; |
||
54 | $this->name = $name; |
||
55 | } |
||
56 | |||
57 | public function getDomain(): Domain |
||
58 | { |
||
59 | return $this->domain; |
||
60 | } |
||
61 | |||
62 | public function getName(): Name |
||
63 | { |
||
64 | return $this->name; |
||
65 | } |
||
66 | |||
67 | public function createdAt(): CreatedAt |
||
70 | } |
||
71 | |||
72 | public function getVersion(): Version |
||
75 | } |
||
76 | |||
77 | public function getPayload(): array |
||
82 |