Skip to content

Commit

Permalink
style: implement StyleCI suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
willtj committed Sep 24, 2021
1 parent c02e584 commit e26c877
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 31 deletions.
70 changes: 39 additions & 31 deletions src/Eloquent/HybridRelations.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ trait HybridRelations
{
/**
* Define a one-to-one relationship.
* @param string $related
* @param string $foreignKey
* @param string $localKey
*
* @param string $related
* @param string $foreignKey
* @param string $localKey
* @return \Illuminate\Database\Eloquent\Relations\HasOne
*/
public function hasOne($related, $foreignKey = null, $localKey = null)
Expand All @@ -39,11 +40,12 @@ public function hasOne($related, $foreignKey = null, $localKey = null)

/**
* Define a polymorphic one-to-one relationship.
* @param string $related
* @param string $name
* @param string $type
* @param string $id
* @param string $localKey
*
* @param string $related
* @param string $name
* @param string $type
* @param string $id
* @param string $localKey
* @return \Illuminate\Database\Eloquent\Relations\MorphOne
*/
public function morphOne($related, $name, $type = null, $id = null, $localKey = null)
Expand All @@ -64,9 +66,10 @@ public function morphOne($related, $name, $type = null, $id = null, $localKey =

/**
* Define a one-to-many relationship.
* @param string $related
* @param string $foreignKey
* @param string $localKey
*
* @param string $related
* @param string $foreignKey
* @param string $localKey
* @return \Illuminate\Database\Eloquent\Relations\HasMany
*/
public function hasMany($related, $foreignKey = null, $localKey = null)
Expand All @@ -87,11 +90,12 @@ public function hasMany($related, $foreignKey = null, $localKey = null)

/**
* Define a polymorphic one-to-many relationship.
* @param string $related
* @param string $name
* @param string $type
* @param string $id
* @param string $localKey
*
* @param string $related
* @param string $name
* @param string $type
* @param string $id
* @param string $localKey
* @return \Illuminate\Database\Eloquent\Relations\MorphMany
*/
public function morphMany($related, $name, $type = null, $id = null, $localKey = null)
Expand All @@ -117,10 +121,11 @@ public function morphMany($related, $name, $type = null, $id = null, $localKey =

/**
* Define an inverse one-to-one or many relationship.
* @param string $related
* @param string $foreignKey
* @param string $otherKey
* @param string $relation
*
* @param string $related
* @param string $foreignKey
* @param string $otherKey
* @param string $relation
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function belongsTo($related, $foreignKey = null, $otherKey = null, $relation = null)
Expand Down Expand Up @@ -160,10 +165,11 @@ public function belongsTo($related, $foreignKey = null, $otherKey = null, $relat

/**
* Define a polymorphic, inverse one-to-one or many relationship.
* @param string $name
* @param string $type
* @param string $id
* @param string $ownerKey
*
* @param string $name
* @param string $type
* @param string $id
* @param string $ownerKey
* @return \Illuminate\Database\Eloquent\Relations\MorphTo
*/
public function morphTo($name = null, $type = null, $id = null, $ownerKey = null)
Expand Down Expand Up @@ -204,13 +210,14 @@ public function morphTo($name = null, $type = null, $id = null, $ownerKey = null

/**
* Define a many-to-many relationship.
* @param string $related
* @param string $collection
* @param string $foreignKey
* @param string $otherKey
* @param string $parentKey
* @param string $relatedKey
* @param string $relation
*
* @param string $related
* @param string $collection
* @param string $foreignKey
* @param string $otherKey
* @param string $parentKey
* @param string $relatedKey
* @param string $relation
* @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
*/
public function belongsToMany(
Expand Down Expand Up @@ -277,6 +284,7 @@ public function belongsToMany(

/**
* Get the relationship name of the belongs to many.
*
* @return string
*/
protected function guessBelongsToManyRelation()
Expand Down
1 change: 1 addition & 0 deletions tests/models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

/**
* Class User.
*
* @property string $_id
* @property string $name
* @property string $email
Expand Down

0 comments on commit e26c877

Please sign in to comment.