-
Notifications
You must be signed in to change notification settings - Fork 0
Add header documentation for classes & traits that can be used in applications #12
Conversation
@@ -46,7 +46,7 @@ public function get($model, string $key, $value, array $attributes) | |||
* @param string $key | |||
* @param mixed $value | |||
* @param array $attributes | |||
* @return mixed | |||
* @return Binary |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By reading the code, Binary
is the only possible return type.
/** | ||
* Cross-database relationships between SQL and MongoDB. | ||
* Use this trait in SQL models to define relationships with MongoDB models. | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doc in Readme.
* @param mixed $column | ||
* @param mixed $value | ||
* @param bool $unique | ||
* @param string|array $column |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If not an array, $column
is used as array key.
@@ -818,14 +818,14 @@ public function push($column, $value = null, $unique = false) | |||
/** | |||
* Remove one or more values from an array. | |||
* | |||
* @param mixed $column | |||
* @param mixed $value | |||
* @param string|array $column |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If not an array, $column is used as array key.
src/Eloquent/Model.php
Outdated
@@ -56,7 +56,7 @@ abstract class Model extends BaseModel | |||
* Custom accessor for the model's id. | |||
* | |||
* @param mixed $value | |||
* @return mixed | |||
* @return string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this is incorrect: any value other than ObjectId
or Binary
instances will be left as-is, so the return type is indeed mixed
. Consider having a numeric identifier, which will be returned as int
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverted this change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…lications (#12) * Add header documentation for classes & traits that can be used in applications * Precise mixed types when possible
This is the case for
Collection
andConnection
which are decorators for MongoDB objects.