@@ -19,8 +19,7 @@ |
||
| 19 | 19 | public function __construct(Client $client = null, $databaseName = null) |
| 20 | 20 | {
|
| 21 | 21 | $this->client = $client === null ? |
| 22 | - new Client(self::getUri(), self::getUriOptions(), self::getDriverOptions()) : |
|
| 23 | - $client; |
|
| 22 | + new Client(self::getUri(), self::getUriOptions(), self::getDriverOptions()) : $client; |
|
| 24 | 23 | $this->databaseName = $databaseName === null ? getenv('MONGODB_DATABASE') : $databaseName;
|
| 25 | 24 | } |
| 26 | 25 | |
@@ -24,8 +24,7 @@ |
||
| 24 | 24 | $this->schema = $reflectionHelper->createInstance($schemaClass)->schema(); |
| 25 | 25 | $this->primaryKey = $primaryKey; |
| 26 | 26 | $this->client = $client === null ? |
| 27 | - new Client(Database::getUri(), Database::getUriOptions(), Database::getDriverOptions()) : |
|
| 28 | - $client; |
|
| 27 | + new Client(Database::getUri(), Database::getUriOptions(), Database::getDriverOptions()) : $client; |
|
| 29 | 28 | $this->databaseName = $databaseName === null ? getenv('MONGODB_DATABASE') : $databaseName; |
| 30 | 29 | $mongodb = $this->client->selectDatabase($this->databaseName); |
| 31 | 30 | $this->collection = $mongodb->selectCollection($this->resourceName); |