Skip to content

Commit 40846ab

Browse files
committed
fix: imrprove php-doc comments
1 parent 42c1ff2 commit 40846ab

30 files changed

+168
-2
lines changed

src/Auth/PasswordResetServiceProvider.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ class PasswordResetServiceProvider extends BasePasswordResetServiceProvider
88
{
99
/**
1010
* Register the token repository implementation.
11+
*
1112
* @return void
1213
*/
1314
protected function registerTokenRepository()

src/Collection.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,14 @@ class Collection
1010
{
1111
/**
1212
* The connection instance.
13+
*
1314
* @var Connection
1415
*/
1516
protected $connection;
1617

1718
/**
18-
* The MongoCollection instance..
19+
* The MongoCollection instance.
20+
*
1921
* @var MongoCollection
2022
*/
2123
protected $collection;
@@ -32,6 +34,7 @@ public function __construct(Connection $connection, MongoCollection $collection)
3234

3335
/**
3436
* Handle dynamic method calls.
37+
*
3538
* @param string $method
3639
* @param array $parameters
3740
* @return mixed

src/Connection.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,21 @@ class Connection extends BaseConnection
1111
{
1212
/**
1313
* The MongoDB database handler.
14+
*
1415
* @var \MongoDB\Database
1516
*/
1617
protected $db;
1718

1819
/**
1920
* The MongoDB connection handler.
21+
*
2022
* @var \MongoDB\Client
2123
*/
2224
protected $connection;
2325

2426
/**
2527
* Create a new database connection instance.
28+
*
2629
* @param array $config
2730
*/
2831
public function __construct(array $config)
@@ -53,6 +56,7 @@ public function __construct(array $config)
5356

5457
/**
5558
* Begin a fluent query against a database collection.
59+
*
5660
* @param string $collection
5761
* @return Query\Builder
5862
*/
@@ -65,6 +69,7 @@ public function collection($collection)
6569

6670
/**
6771
* Begin a fluent query against a database collection.
72+
*
6873
* @param string $table
6974
* @param string|null $as
7075
* @return Query\Builder
@@ -76,6 +81,7 @@ public function table($table, $as = null)
7681

7782
/**
7883
* Get a MongoDB collection.
84+
*
7985
* @param string $name
8086
* @return Collection
8187
*/
@@ -94,6 +100,7 @@ public function getSchemaBuilder()
94100

95101
/**
96102
* Get the MongoDB database object.
103+
*
97104
* @return \MongoDB\Database
98105
*/
99106
public function getMongoDB()
@@ -103,6 +110,7 @@ public function getMongoDB()
103110

104111
/**
105112
* return MongoDB object.
113+
*
106114
* @return \MongoDB\Client
107115
*/
108116
public function getMongoClient()
@@ -120,6 +128,7 @@ public function getDatabaseName()
120128

121129
/**
122130
* Get the name of the default database based on db config or try to detect it from dsn.
131+
*
123132
* @param string $dsn
124133
* @param array $config
125134
* @return string
@@ -140,6 +149,7 @@ protected function getDefaultDatabaseName($dsn, $config)
140149

141150
/**
142151
* Create a new MongoDB connection.
152+
*
143153
* @param string $dsn
144154
* @param array $config
145155
* @param array $options
@@ -175,6 +185,7 @@ public function disconnect()
175185

176186
/**
177187
* Determine if the given configuration array has a dsn string.
188+
*
178189
* @param array $config
179190
* @return bool
180191
*/
@@ -185,6 +196,7 @@ protected function hasDsnString(array $config)
185196

186197
/**
187198
* Get the DSN string form configuration.
199+
*
188200
* @param array $config
189201
* @return string
190202
*/
@@ -195,6 +207,7 @@ protected function getDsnString(array $config)
195207

196208
/**
197209
* Get the DSN string for a host / port configuration.
210+
*
198211
* @param array $config
199212
* @return string
200213
*/
@@ -218,6 +231,7 @@ protected function getHostDsn(array $config)
218231

219232
/**
220233
* Create a DSN string from a configuration.
234+
*
221235
* @param array $config
222236
* @return string
223237
*/
@@ -270,6 +284,7 @@ protected function getDefaultSchemaGrammar()
270284

271285
/**
272286
* Set database.
287+
*
273288
* @param \MongoDB\Database $db
274289
*/
275290
public function setDatabase(\MongoDB\Database $db)
@@ -279,6 +294,7 @@ public function setDatabase(\MongoDB\Database $db)
279294

280295
/**
281296
* Dynamically pass methods to the connection.
297+
*
282298
* @param string $method
283299
* @param array $parameters
284300
* @return mixed

src/Eloquent/Builder.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ class Builder extends EloquentBuilder
1313

1414
/**
1515
* The methods that should be returned from query builder.
16+
*
1617
* @var array
1718
*/
1819
protected $passthru = [

src/Eloquent/EmbedsRelations.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ trait EmbedsRelations
1010
{
1111
/**
1212
* Define an embedded one-to-many relationship.
13+
*
1314
* @param string $related
1415
* @param string $localKey
1516
* @param string $foreignKey
@@ -44,6 +45,7 @@ protected function embedsMany($related, $localKey = null, $foreignKey = null, $r
4445

4546
/**
4647
* Define an embedded one-to-many relationship.
48+
*
4749
* @param string $related
4850
* @param string $localKey
4951
* @param string $foreignKey

src/Eloquent/HybridRelations.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ trait HybridRelations
1616
{
1717
/**
1818
* Define a one-to-one relationship.
19+
*
1920
* @param string $related
2021
* @param string $foreignKey
2122
* @param string $localKey
@@ -39,6 +40,7 @@ public function hasOne($related, $foreignKey = null, $localKey = null)
3940

4041
/**
4142
* Define a polymorphic one-to-one relationship.
43+
*
4244
* @param string $related
4345
* @param string $name
4446
* @param string $type
@@ -64,6 +66,7 @@ public function morphOne($related, $name, $type = null, $id = null, $localKey =
6466

6567
/**
6668
* Define a one-to-many relationship.
69+
*
6770
* @param string $related
6871
* @param string $foreignKey
6972
* @param string $localKey
@@ -87,6 +90,7 @@ public function hasMany($related, $foreignKey = null, $localKey = null)
8790

8891
/**
8992
* Define a polymorphic one-to-many relationship.
93+
*
9094
* @param string $related
9195
* @param string $name
9296
* @param string $type
@@ -117,6 +121,7 @@ public function morphMany($related, $name, $type = null, $id = null, $localKey =
117121

118122
/**
119123
* Define an inverse one-to-one or many relationship.
124+
*
120125
* @param string $related
121126
* @param string $foreignKey
122127
* @param string $otherKey
@@ -160,6 +165,7 @@ public function belongsTo($related, $foreignKey = null, $otherKey = null, $relat
160165

161166
/**
162167
* Define a polymorphic, inverse one-to-one or many relationship.
168+
*
163169
* @param string $name
164170
* @param string $type
165171
* @param string $id
@@ -204,6 +210,7 @@ public function morphTo($name = null, $type = null, $id = null, $ownerKey = null
204210

205211
/**
206212
* Define a many-to-many relationship.
213+
*
207214
* @param string $related
208215
* @param string $collection
209216
* @param string $foreignKey
@@ -277,6 +284,7 @@ public function belongsToMany(
277284

278285
/**
279286
* Get the relationship name of the belongs to many.
287+
*
280288
* @return string
281289
*/
282290
protected function guessBelongsToManyRelation()

src/Eloquent/Model.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,30 +21,35 @@ abstract class Model extends BaseModel
2121

2222
/**
2323
* The collection associated with the model.
24+
*
2425
* @var string
2526
*/
2627
protected $collection;
2728

2829
/**
2930
* The primary key for the model.
31+
*
3032
* @var string
3133
*/
3234
protected $primaryKey = '_id';
3335

3436
/**
3537
* The primary key type.
38+
*
3639
* @var string
3740
*/
3841
protected $keyType = 'string';
3942

4043
/**
4144
* The parent relation instance.
45+
*
4246
* @var Relation
4347
*/
4448
protected $parentRelation;
4549

4650
/**
4751
* Custom accessor for the model's id.
52+
*
4853
* @param mixed $value
4954
* @return mixed
5055
*/
@@ -269,6 +274,7 @@ public function originalIsEquivalent($key)
269274

270275
/**
271276
* Remove one or more fields.
277+
*
272278
* @param mixed $columns
273279
* @return int
274280
*/
@@ -314,6 +320,7 @@ public function push()
314320

315321
/**
316322
* Remove one or more values from an array.
323+
*
317324
* @param string $column
318325
* @param mixed $values
319326
* @return mixed
@@ -332,6 +339,7 @@ public function pull($column, $values)
332339

333340
/**
334341
* Append one or more values to the underlying attribute value and sync with original.
342+
*
335343
* @param string $column
336344
* @param array $values
337345
* @param bool $unique
@@ -356,6 +364,7 @@ protected function pushAttributeValues($column, array $values, $unique = false)
356364

357365
/**
358366
* Remove one or more values to the underlying attribute value and sync with original.
367+
*
359368
* @param string $column
360369
* @param array $values
361370
*/
@@ -388,6 +397,7 @@ public function getForeignKey()
388397

389398
/**
390399
* Set the parent relation.
400+
*
391401
* @param \Illuminate\Database\Eloquent\Relations\Relation $relation
392402
*/
393403
public function setParentRelation(Relation $relation)
@@ -397,6 +407,7 @@ public function setParentRelation(Relation $relation)
397407

398408
/**
399409
* Get the parent relation.
410+
*
400411
* @return \Illuminate\Database\Eloquent\Relations\Relation
401412
*/
402413
public function getParentRelation()
@@ -432,6 +443,7 @@ protected function removeTableFromKey($key)
432443

433444
/**
434445
* Get the queueable relationships for the entity.
446+
*
435447
* @return array
436448
*/
437449
public function getQueueableRelations()
@@ -461,6 +473,7 @@ public function getQueueableRelations()
461473

462474
/**
463475
* Get loaded relations for the instance without parent.
476+
*
464477
* @return array
465478
*/
466479
protected function getRelationsWithoutParent()
@@ -477,6 +490,7 @@ protected function getRelationsWithoutParent()
477490
/**
478491
* Checks if column exists on a table. As this is a document model, just return true. This also
479492
* prevents calls to non-existent function Grammar::compileColumnListing().
493+
*
480494
* @param string $key
481495
* @return bool
482496
*/

src/Helpers/QueriesRelationships.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,14 @@ trait QueriesRelationships
1515
{
1616
/**
1717
* Add a relationship count / exists condition to the query.
18+
*
1819
* @param Relation|string $relation
1920
* @param string $operator
2021
* @param int $count
2122
* @param string $boolean
2223
* @param Closure|null $callback
2324
* @return Builder|static
25+
* @throws Exception
2426
*/
2527
public function has($relation, $operator = '>=', $count = 1, $boolean = 'and', Closure $callback = null)
2628
{
@@ -72,6 +74,7 @@ protected function isAcrossConnections(Relation $relation)
7274

7375
/**
7476
* Compare across databases.
77+
*
7578
* @param Relation $relation
7679
* @param string $operator
7780
* @param int $count
@@ -150,6 +153,7 @@ protected function getConstrainedRelatedIds($relations, $operator, $count)
150153

151154
/**
152155
* Returns key we are constraining this parent model's query with.
156+
*
153157
* @param Relation $relation
154158
* @return string
155159
* @throws Exception

0 commit comments

Comments
 (0)