@@ -21,7 +21,7 @@ class Connection extends \Illuminate\Database\Connection
2121 /**
2222 * Create a new database connection instance.
2323 *
24- * @param array $config
24+ * @param array $config
2525 */
2626 public function __construct (array $ config )
2727 {
@@ -45,9 +45,7 @@ public function __construct(array $config)
4545 }
4646
4747 /**
48- * Get the default post processor instance.
49- *
50- * @return Query\Processor
48+ * @inheritdoc
5149 */
5250 protected function getDefaultPostProcessor ()
5351 {
@@ -57,7 +55,7 @@ protected function getDefaultPostProcessor()
5755 /**
5856 * Begin a fluent query against a database collection.
5957 *
60- * @param string $collection
58+ * @param string $collection
6159 * @return Query\Builder
6260 */
6361 public function collection ($ collection )
@@ -72,7 +70,7 @@ public function collection($collection)
7270 /**
7371 * Begin a fluent query against a database collection.
7472 *
75- * @param string $table
73+ * @param string $table
7674 * @return Query\Builder
7775 */
7876 public function table ($ table )
@@ -83,7 +81,7 @@ public function table($table)
8381 /**
8482 * Get a MongoDB collection.
8583 *
86- * @param string $name
84+ * @param string $name
8785 * @return Collection
8886 */
8987 public function getCollection ($ name )
@@ -92,9 +90,7 @@ public function getCollection($name)
9290 }
9391
9492 /**
95- * Get a schema builder instance for the connection.
96- *
97- * @return Schema\Builder
93+ * @inheritdoc
9894 */
9995 public function getSchemaBuilder ()
10096 {
@@ -124,9 +120,9 @@ public function getMongoClient()
124120 /**
125121 * Create a new MongoDB connection.
126122 *
127- * @param string $dsn
128- * @param array $config
129- * @param array $options
123+ * @param string $dsn
124+ * @param array $config
125+ * @param array $options
130126 * @return \MongoDB\Client
131127 */
132128 protected function createConnection ($ dsn , array $ config , array $ options )
@@ -139,18 +135,18 @@ protected function createConnection($dsn, array $config, array $options)
139135 }
140136
141137 // Check if the credentials are not already set in the options
142- if (!isset ($ options ['username ' ]) && !empty ($ config ['username ' ])) {
138+ if (! isset ($ options ['username ' ]) && ! empty ($ config ['username ' ])) {
143139 $ options ['username ' ] = $ config ['username ' ];
144140 }
145- if (!isset ($ options ['password ' ]) && !empty ($ config ['password ' ])) {
141+ if (! isset ($ options ['password ' ]) && ! empty ($ config ['password ' ])) {
146142 $ options ['password ' ] = $ config ['password ' ];
147143 }
148144
149145 return new Client ($ dsn , $ options , $ driverOptions );
150146 }
151147
152148 /**
153- * Disconnect from the underlying MongoDB connection.
149+ * @inheritdoc
154150 */
155151 public function disconnect ()
156152 {
@@ -160,7 +156,7 @@ public function disconnect()
160156 /**
161157 * Create a DSN string from a configuration.
162158 *
163- * @param array $config
159+ * @param array $config
164160 * @return string
165161 */
166162 protected function getDsn (array $ config )
@@ -176,41 +172,34 @@ protected function getDsn(array $config)
176172 foreach ($ hosts as &$ host ) {
177173 // Check if we need to add a port to the host
178174 if (strpos ($ host , ': ' ) === false && ! empty ($ config ['port ' ])) {
179- $ host = $ host . ': ' . $ config ['port ' ];
175+ $ host = $ host. ': ' . $ config ['port ' ];
180176 }
181177 }
182178
183179 // Check if we want to authenticate against a specific database.
184180 $ auth_database = isset ($ config ['options ' ]) && ! empty ($ config ['options ' ]['database ' ]) ? $ config ['options ' ]['database ' ] : null ;
185181
186- return 'mongodb:// ' . implode (', ' , $ hosts ) . ($ auth_database ? '/ ' . $ auth_database : '' );
182+ return 'mongodb:// ' . implode (', ' , $ hosts ). ($ auth_database ? '/ ' . $ auth_database : '' );
187183 }
188184
189185 /**
190- * Get the elapsed time since a given starting point.
191- *
192- * @param int $start
193- * @return float
186+ * @inheritdoc
194187 */
195188 public function getElapsedTime ($ start )
196189 {
197190 return parent ::getElapsedTime ($ start );
198191 }
199192
200193 /**
201- * Get the PDO driver name.
202- *
203- * @return string
194+ * @inheritdoc
204195 */
205196 public function getDriverName ()
206197 {
207198 return 'mongodb ' ;
208199 }
209200
210201 /**
211- * Get the default schema grammar instance.
212- *
213- * @return Schema\Grammar
202+ * @inheritdoc
214203 */
215204 protected function getDefaultSchemaGrammar ()
216205 {
@@ -220,8 +209,8 @@ protected function getDefaultSchemaGrammar()
220209 /**
221210 * Dynamically pass methods to the connection.
222211 *
223- * @param string $method
224- * @param array $parameters
212+ * @param string $method
213+ * @param array $parameters
225214 * @return mixed
226215 */
227216 public function __call ($ method , $ parameters )
0 commit comments