@@ -79,7 +79,7 @@ |
||
79 | 79 | $this->skipUnknownTypes = $skipUnknownTypes; |
80 | 80 | $this->callback = $callback; |
81 | 81 | |
82 | - $this->messagesToReturn = new \ArrayIterator($lastSnapshotCommit); |
|
82 | + $this->messagesToReturn = new \ArrayIterator($lastSnapshotCommit); |
|
83 | 83 | |
84 | 84 | $this->initializeNextItem(); |
85 | 85 | } |
@@ -1,10 +1,10 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * This file is part of the SmartGecko(c) business platform. |
|
4 | - * |
|
5 | - * For the full copyright and license information, please view the LICENSE |
|
6 | - * file that was distributed with this source code. |
|
7 | - */ |
|
3 | + * This file is part of the SmartGecko(c) business platform. |
|
4 | + * |
|
5 | + * For the full copyright and license information, please view the LICENSE |
|
6 | + * file that was distributed with this source code. |
|
7 | + */ |
|
8 | 8 | |
9 | 9 | namespace Governor\Framework\EventStore\Mongo; |
10 | 10 |
@@ -1,10 +1,10 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * This file is part of the SmartGecko(c) business platform. |
|
4 | - * |
|
5 | - * For the full copyright and license information, please view the LICENSE |
|
6 | - * file that was distributed with this source code. |
|
7 | - */ |
|
3 | + * This file is part of the SmartGecko(c) business platform. |
|
4 | + * |
|
5 | + * For the full copyright and license information, please view the LICENSE |
|
6 | + * file that was distributed with this source code. |
|
7 | + */ |
|
8 | 8 | |
9 | 9 | namespace Governor\Framework\EventStore\Mongo; |
10 | 10 |
@@ -115,10 +115,10 @@ discard block |
||
115 | 115 | { |
116 | 116 | $query = $this->em->createQuery( |
117 | 117 | sprintf( |
118 | - "SELECT new Governor\Framework\Serializer\SimpleSerializedDomainEventData(". |
|
119 | - "e.eventIdentifier, e.aggregateIdentifier, e.scn, ". |
|
120 | - "e.timestamp, e.payloadType, e.payloadRevision, e.payload, e.metaData) ". |
|
121 | - "FROM %s e %s ORDER BY e.timestamp ASC, "."e.scn ASC, e.aggregateIdentifier ASC", |
|
118 | + "SELECT new Governor\Framework\Serializer\SimpleSerializedDomainEventData(" . |
|
119 | + "e.eventIdentifier, e.aggregateIdentifier, e.scn, " . |
|
120 | + "e.timestamp, e.payloadType, e.payloadRevision, e.payload, e.metaData) " . |
|
121 | + "FROM %s e %s ORDER BY e.timestamp ASC, " . "e.scn ASC, e.aggregateIdentifier ASC", |
|
122 | 122 | $this->domainEventEntryEntityName, |
123 | 123 | $this->buildWhereClause() |
124 | 124 | ) |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | |
146 | 146 | $query = "WHERE "; |
147 | 147 | if (null !== $this->lastItem) { |
148 | - $query .= "((e.timestamp > :timestamp) OR (e.timestamp = :timestamp AND e.scn > :scn) ". |
|
148 | + $query .= "((e.timestamp > :timestamp) OR (e.timestamp = :timestamp AND e.scn > :scn) " . |
|
149 | 149 | " OR (e.timestamp = :timestamp AND e.scn = :scn AND e.aggregateIdentifier > :aggregateIdentifier))"; |
150 | 150 | |
151 | 151 | $this->parameters[':timestamp'] = $this->lastItem->getTimestamp(); |
@@ -143,11 +143,11 @@ discard block |
||
143 | 143 | ) { |
144 | 144 | $query = $entityManager-> |
145 | 145 | createQuery( |
146 | - "SELECT new Governor\Framework\Serializer\SimpleSerializedDomainEventData(". |
|
147 | - "e.eventIdentifier, e.aggregateIdentifier, e.scn, ". |
|
148 | - "e.timestamp, e.payloadType, e.payloadRevision, e.payload, e.metaData) ". |
|
149 | - "FROM ".$this->snapshotEventEntryEntityName()." e ". |
|
150 | - "WHERE e.aggregateIdentifier = :id AND e.type = :type ". |
|
146 | + "SELECT new Governor\Framework\Serializer\SimpleSerializedDomainEventData(" . |
|
147 | + "e.eventIdentifier, e.aggregateIdentifier, e.scn, " . |
|
148 | + "e.timestamp, e.payloadType, e.payloadRevision, e.payload, e.metaData) " . |
|
149 | + "FROM " . $this->snapshotEventEntryEntityName() . " e " . |
|
150 | + "WHERE e.aggregateIdentifier = :id AND e.type = :type " . |
|
151 | 151 | "ORDER BY e.scn DESC" |
152 | 152 | ) |
153 | 153 | ->setFirstResult(0) |
@@ -214,9 +214,9 @@ discard block |
||
214 | 214 | $scnOfFirstToPrune = current($redundantSnapshots); |
215 | 215 | |
216 | 216 | $entityManager->createQuery( |
217 | - "DELETE FROM ".$this->snapshotEventEntryEntityName()." e ". |
|
218 | - "WHERE e.type = :type ". |
|
219 | - "AND e.aggregateIdentifier = :aggregateIdentifier ". |
|
217 | + "DELETE FROM " . $this->snapshotEventEntryEntityName() . " e " . |
|
218 | + "WHERE e.type = :type " . |
|
219 | + "AND e.aggregateIdentifier = :aggregateIdentifier " . |
|
220 | 220 | "AND e.scn <= :scnOfFirstToPrune" |
221 | 221 | ) |
222 | 222 | ->setParameters( |
@@ -236,8 +236,8 @@ discard block |
||
236 | 236 | EntityManager $entityManager |
237 | 237 | ) { |
238 | 238 | $query = $entityManager->createQuery( |
239 | - "SELECT e.scn FROM ".$this->snapshotEventEntryEntityName()." e ". |
|
240 | - "WHERE e.type = :type AND e.aggregateIdentifier = :aggregateIdentifier ". |
|
239 | + "SELECT e.scn FROM " . $this->snapshotEventEntryEntityName() . " e " . |
|
240 | + "WHERE e.type = :type AND e.aggregateIdentifier = :aggregateIdentifier " . |
|
241 | 241 | "ORDER BY e.scn DESC" |
242 | 242 | ) |
243 | 243 | ->setFirstResult($maxSnapshotsArchived - 1) |
@@ -199,7 +199,7 @@ |
||
199 | 199 | $snapshotScn = $snapshotEvent->getScn(); |
200 | 200 | } catch (\RuntimeException $ex) { |
201 | 201 | $this->logger->warn( |
202 | - "Error while reading snapshot event entry. ". |
|
202 | + "Error while reading snapshot event entry. " . |
|
203 | 203 | "Reconstructing aggregate on entire event stream. Caused by: {class} {message}", |
204 | 204 | array( |
205 | 205 | 'class' => get_class($ex), |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | $this->removedValues = array_udiff( |
108 | 108 | $this->removedValues, |
109 | 109 | array($associationValue), |
110 | - function (AssociationValue $a, AssociationValue $b) { |
|
110 | + function(AssociationValue $a, AssociationValue $b) { |
|
111 | 111 | return $a->compareTo($b); |
112 | 112 | } |
113 | 113 | ); |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | $this->values = array_udiff( |
154 | 154 | $this->values, |
155 | 155 | array($associationValue), |
156 | - function (AssociationValue $a, AssociationValue $b) { |
|
156 | + function(AssociationValue $a, AssociationValue $b) { |
|
157 | 157 | return $a->compareTo($b); |
158 | 158 | } |
159 | 159 | ); |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | $this->addedValues = array_udiff( |
168 | 168 | $this->addedValues, |
169 | 169 | array($associationValue), |
170 | - function ($a, $b) { |
|
170 | + function($a, $b) { |
|
171 | 171 | return $a->compareTo($b); |
172 | 172 | } |
173 | 173 | ); |
@@ -66,7 +66,7 @@ |
||
66 | 66 | if (0 === count($method->getParameters())) { |
67 | 67 | throw new \RuntimeException( |
68 | 68 | sprintf( |
69 | - "Invalid method signature detected of %s::%s. ". |
|
69 | + "Invalid method signature detected of %s::%s. " . |
|
70 | 70 | "Methods annotated with @SagaEventHandler must have exatly one parameter with the type of the message they handle. ", |
71 | 71 | $reflectionClass->name, |
72 | 72 | $method->name |
@@ -58,7 +58,7 @@ |
||
58 | 58 | $this->serializer = SerializerBuilder::create() |
59 | 59 | ->addDefaultHandlers() |
60 | 60 | ->configureHandlers( |
61 | - function (HandlerRegistry $registry) { |
|
61 | + function(HandlerRegistry $registry) { |
|
62 | 62 | $registry->registerSubscribingHandler(new RamseyUuidHandler()); |
63 | 63 | } |
64 | 64 | )->build(); |
@@ -1,10 +1,10 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Created by PhpStorm. |
|
4 | - * User: david |
|
5 | - * Date: 19/12/14 |
|
6 | - * Time: 21:14 |
|
7 | - */ |
|
3 | + * Created by PhpStorm. |
|
4 | + * User: david |
|
5 | + * Date: 19/12/14 |
|
6 | + * Time: 21:14 |
|
7 | + */ |
|
8 | 8 | |
9 | 9 | namespace Governor\Framework\Test\Saga; |
10 | 10 |