Skip to content

Commit

Permalink
Added check for sub-paths before collections removal in CollectionPer…
Browse files Browse the repository at this point in the history
…sister::deleteAll. Fixed style of code.
  • Loading branch information
watari committed Oct 19, 2018
1 parent 8c5c56c commit 00fbe04
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Doctrine/ODM/MongoDB/Persisters/CollectionPersister.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function __construct(DocumentManager $dm, PersistenceBuilder $pb, UnitOfW
* @param PersistentCollectionInterface[] $collections
* @param array $options
*/
public function deleteAll(array $collections, array $options)
public function deleteAll(array $collections, array $options) : void
{
$parents = [];
$unsetPathsMap = [];
Expand Down Expand Up @@ -284,7 +284,7 @@ private function executeQuery(object $document, array $newObj, array $options) :
}
}

private function excludeSubPaths(array $paths)
private function excludeSubPaths(array $paths) : array
{
$checkedPaths = [];
$pathsAmount = count($paths);
Expand Down

0 comments on commit 00fbe04

Please sign in to comment.