@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | |
| 144 | 144 | /** |
| 145 | 145 | * @param string $commandIdentifier |
| 146 | - * @param mixed $reply |
|
| 146 | + * @param string $reply |
|
| 147 | 147 | */ |
| 148 | 148 | public function writeCommandReply($commandIdentifier, $reply) |
| 149 | 149 | { |
@@ -200,11 +200,18 @@ discard block |
||
| 200 | 200 | ); |
| 201 | 201 | } |
| 202 | 202 | |
| 203 | + /** |
|
| 204 | + * @param string $commandName |
|
| 205 | + */ |
|
| 203 | 206 | public static function hashCommandName($commandName) |
| 204 | 207 | { |
| 205 | 208 | return hash('md5', $commandName); |
| 206 | 209 | } |
| 207 | 210 | |
| 211 | + /** |
|
| 212 | + * @param string $commandName |
|
| 213 | + * @param string $routingKey |
|
| 214 | + */ |
|
| 208 | 215 | public static function hashCommandRouting($commandName, $routingKey) |
| 209 | 216 | { |
| 210 | 217 | return hash('md5', sprintf('%s-%s', $commandName, $routingKey)); |
@@ -60,6 +60,9 @@ |
||
| 60 | 60 | return $message->getMetaData()->get($this->getKey()); |
| 61 | 61 | } |
| 62 | 62 | |
| 63 | + /** |
|
| 64 | + * @return string |
|
| 65 | + */ |
|
| 63 | 66 | private function getKey() |
| 64 | 67 | {
|
| 65 | 68 | // !!! TODO check types on primitives ? |
@@ -54,7 +54,7 @@ |
||
| 54 | 54 | /** |
| 55 | 55 | * Returns an array of registered EventListenerInterface-s. |
| 56 | 56 | * |
| 57 | - * @return \SplObjectStorage|EventListenerInterface[] |
|
| 57 | + * @return \SplObjectStorage |
|
| 58 | 58 | */ |
| 59 | 59 | public function getListeners() |
| 60 | 60 | { |
@@ -41,6 +41,9 @@ |
||
| 41 | 41 | private $methodName; |
| 42 | 42 | private $eventTarget; |
| 43 | 43 | |
| 44 | + /** |
|
| 45 | + * @param string $eventName |
|
| 46 | + */ |
|
| 44 | 47 | function __construct($eventName, $methodName, $eventTarget) |
| 45 | 48 | { |
| 46 | 49 | $this->eventName = $eventName; |
@@ -129,6 +129,9 @@ |
||
| 129 | 129 | $this->eventStore->appendEvents($this->getTypeIdentifier(), $eventStream); |
| 130 | 130 | } |
| 131 | 131 | |
| 132 | + /** |
|
| 133 | + * @param string $className |
|
| 134 | + */ |
|
| 132 | 135 | private function validateEventSourcedAggregate($className) |
| 133 | 136 | { |
| 134 | 137 | $reflClass = new \ReflectionClass($className); |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | |
| 33 | 33 | /** |
| 34 | 34 | * |
| 35 | - * @return \Governor\Framework\Serializer\SerializedDomainEventDataInterface|null |
|
| 35 | + * @return null|SimpleSerializedDomainEventData |
|
| 36 | 36 | * @throws \RuntimeException |
| 37 | 37 | */ |
| 38 | 38 | public function readEventMessage() |
@@ -92,6 +92,9 @@ discard block |
||
| 92 | 92 | ); |
| 93 | 93 | } |
| 94 | 94 | |
| 95 | + /** |
|
| 96 | + * @param integer $length |
|
| 97 | + */ |
|
| 95 | 98 | private function readBytes($length) |
| 96 | 99 | { |
| 97 | 100 | $stream = null; |
@@ -112,6 +112,10 @@ |
||
| 112 | 112 | return new FilesystemDomainEventStream($file, $this->serializer); |
| 113 | 113 | } |
| 114 | 114 | |
| 115 | + /** |
|
| 116 | + * @param string $type |
|
| 117 | + * @param \SplFileObject $eventFile |
|
| 118 | + */ |
|
| 115 | 119 | private function readSnapshotEvent($type, $identifier, $eventFile) |
| 116 | 120 | { |
| 117 | 121 | $snapshotEvent = null; |
@@ -193,7 +193,7 @@ |
||
| 193 | 193 | * @param mixed $upcasterChain Set of upcasters to use when an event needs upcasting before |
| 194 | 194 | * de-serialization |
| 195 | 195 | * @param bool $skipUnknownTypes whether to skip unknown event types |
| 196 | - * @return DomainEventMessageInterface[] The actual DomainEventMessage instances stored in this entry |
|
| 196 | + * @return GenericDomainEventMessage[] The actual DomainEventMessage instances stored in this entry |
|
| 197 | 197 | */ |
| 198 | 198 | |
| 199 | 199 | public function getDomainEvents( |
@@ -182,7 +182,7 @@ |
||
| 182 | 182 | } |
| 183 | 183 | |
| 184 | 184 | /** |
| 185 | - * @return callable |
|
| 185 | + * @return \Closure |
|
| 186 | 186 | */ |
| 187 | 187 | private function getCursorCallback() |
| 188 | 188 | { |