src/Governor/Framework/Domain/GenericEventMessage.php 1 location
|
@@ 104-116 (lines=13) @@
|
101 |
|
* @param array $metadata |
102 |
|
* @return GenericEventMessage |
103 |
|
*/ |
104 |
|
public function withMetaData(array $metadata = []) |
105 |
|
{ |
106 |
|
if ($this->getMetaData()->isEqualTo($metadata)) { |
107 |
|
return $this; |
108 |
|
} |
109 |
|
|
110 |
|
return new GenericEventMessage( |
111 |
|
$this->getPayload(), |
112 |
|
new MetaData($metadata), |
113 |
|
$this->getIdentifier(), |
114 |
|
$this->getTimestamp() |
115 |
|
); |
116 |
|
} |
117 |
|
|
118 |
|
|
119 |
|
} |
src/Governor/Framework/Domain/GenericMessage.php 1 location
|
@@ 121-128 (lines=8) @@
|
118 |
|
* @param array $metadata |
119 |
|
* @return GenericMessage |
120 |
|
*/ |
121 |
|
public function withMetaData(array $metadata = []) |
122 |
|
{ |
123 |
|
if ($this->getMetaData()->isEqualTo($metadata)) { |
124 |
|
return $this; |
125 |
|
} |
126 |
|
|
127 |
|
return new GenericMessage($this->getPayload(), new MetaData($metadata), $this->getIdentifier()); |
128 |
|
} |
129 |
|
|
130 |
|
} |
131 |
|
|