@@ 262-274 (lines=13) @@ | ||
259 | } |
|
260 | ||
261 | /** {@inheritdoc} */ |
|
262 | public function getDeletedDocuments() |
|
263 | { |
|
264 | $compare = function ($a, $b) { |
|
265 | $compareA = is_object($a) ? spl_object_hash($a) : $a; |
|
266 | $compareb = is_object($b) ? spl_object_hash($b) : $b; |
|
267 | return $compareA === $compareb ? 0 : ($compareA > $compareb ? 1 : -1); |
|
268 | }; |
|
269 | return array_values(array_udiff( |
|
270 | $this->snapshot, |
|
271 | $this->coll->toArray(), |
|
272 | $compare |
|
273 | )); |
|
274 | } |
|
275 | ||
276 | /** {@inheritdoc} */ |
|
277 | public function getInsertDiff() |
|
@@ 287-299 (lines=13) @@ | ||
284 | } |
|
285 | ||
286 | /** {@inheritdoc} */ |
|
287 | public function getInsertedDocuments() |
|
288 | { |
|
289 | $compare = function ($a, $b) { |
|
290 | $compareA = is_object($a) ? spl_object_hash($a) : $a; |
|
291 | $compareb = is_object($b) ? spl_object_hash($b) : $b; |
|
292 | return $compareA === $compareb ? 0 : ($compareA > $compareb ? 1 : -1); |
|
293 | }; |
|
294 | return array_values(array_udiff( |
|
295 | $this->coll->toArray(), |
|
296 | $this->snapshot, |
|
297 | $compare |
|
298 | )); |
|
299 | } |
|
300 | ||
301 | /** {@inheritdoc} */ |
|
302 | public function getOwner() |