@@ -103,6 +103,9 @@ |
||
103 | 103 | } |
104 | 104 | } |
105 | 105 | |
106 | + /** |
|
107 | + * @return string |
|
108 | + */ |
|
106 | 109 | private function findSuitableNode(CommandMessageInterface $command) |
107 | 110 | { |
108 | 111 | $nodes = $this->template->getSubscriptions($command->getCommandName()); |
@@ -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 ? |
@@ -68,6 +68,9 @@ |
||
68 | 68 | $this->isOpen = true; |
69 | 69 | } |
70 | 70 | |
71 | + /** |
|
72 | + * @param string $propertyName |
|
73 | + */ |
|
71 | 74 | private function getTerminalProperty($propertyName) |
72 | 75 | { |
73 | 76 | $reflClass = new \ReflectionClass($this->terminal); |
@@ -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; |