@@ -77,6 +77,9 @@ discard block |
||
77 | 77 | return $return === $entity ? $this : $return; |
78 | 78 | } |
79 | 79 | |
80 | + /** |
|
81 | + * @param string $method |
|
82 | + */ |
|
80 | 83 | protected function proxyClone($method, ...$args) |
81 | 84 | { |
82 | 85 | $value = $this->proxy($method, ...$args); |
@@ -85,6 +88,9 @@ discard block |
||
85 | 88 | return $return; |
86 | 89 | } |
87 | 90 | |
91 | + /** |
|
92 | + * @param string $property |
|
93 | + */ |
|
88 | 94 | protected function inaccessible($property) |
89 | 95 | { |
90 | 96 | throw new \DomainException(sprintf( |
@@ -93,6 +99,9 @@ discard block |
||
93 | 99 | )); |
94 | 100 | } |
95 | 101 | |
102 | + /** |
|
103 | + * @param string $property |
|
104 | + */ |
|
96 | 105 | protected function immutable($property) |
97 | 106 | { |
98 | 107 | throw new ImmutablePropertyException($property, $this); |
@@ -188,12 +188,12 @@ |
||
188 | 188 | public function findLatest($sourceId, $isDraft = false) |
189 | 189 | { |
190 | 190 | return $this->createQueryBuilder() |
191 | - ->field('snapshotEntity')->equals(new \MongoId($sourceId)) |
|
192 | - ->field('snapshotMeta.isDraft')->equals($isDraft) |
|
193 | - ->sort('snapshotMeta.dateCreated.date', 'desc') |
|
194 | - ->limit(1) |
|
195 | - ->getQuery() |
|
196 | - ->getSingleResult(); |
|
191 | + ->field('snapshotEntity')->equals(new \MongoId($sourceId)) |
|
192 | + ->field('snapshotMeta.isDraft')->equals($isDraft) |
|
193 | + ->sort('snapshotMeta.dateCreated.date', 'desc') |
|
194 | + ->limit(1) |
|
195 | + ->getQuery() |
|
196 | + ->getSingleResult(); |
|
197 | 197 | |
198 | 198 | } |
199 | 199 |