Skip to content

Commit

Permalink
Change to return void
Browse files Browse the repository at this point in the history
  • Loading branch information
franmomu committed Jul 6, 2021
1 parent 783744b commit 17b4d76
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/Doctrine/ODM/MongoDB/SchemaManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,7 @@ public function enableShardingForDbByDocumentName(string $documentName): void
}
}

private function runShardCollectionCommand(string $documentName, ?WriteConcern $writeConcern = null): array
private function runShardCollectionCommand(string $documentName, ?WriteConcern $writeConcern = null): void
{
$class = $this->dm->getClassMetadata($documentName);
$dbName = $this->dm->getDocumentDatabase($documentName)->getDatabaseName();
Expand All @@ -765,15 +765,15 @@ private function runShardCollectionCommand(string $documentName, ?WriteConcern $
$shardKeyPart[$fieldName] = $order;
}

return $adminDb->command(
$adminDb->command(
array_merge(
[
'shardCollection' => $dbName . '.' . $class->getCollection(),
'key' => $shardKeyPart,
],
$this->getWriteOptions(null, $writeConcern)
)
)->toArray()[0];
);
}

private function ensureGridFSIndexes(ClassMetadata $class, ?int $maxTimeMs = null, ?WriteConcern $writeConcern = null, bool $background = false): void
Expand Down

0 comments on commit 17b4d76

Please sign in to comment.