Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply fixes from StyleCI #189

Merged
merged 1 commit into from
Nov 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions src/Filterable.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ trait Filterable
/**
* Creates local scope to run the filter.
*
* @param $query
* @param $query
* @param array $input
* @param null|string|ModelFilter $filter
* @return \Illuminate\Database\Eloquent\Builder
Expand Down Expand Up @@ -104,9 +104,9 @@ public function getModelFilterClass()
/**
* WHERE $column LIKE %$value% query.
*
* @param $query
* @param $column
* @param $value
* @param $query
* @param $column
* @param $value
* @param string $boolean
* @return mixed
*/
Expand All @@ -118,9 +118,9 @@ public function scopeWhereLike($query, $column, $value, $boolean = 'and')
/**
* WHERE $column LIKE $value% query.
*
* @param $query
* @param $column
* @param $value
* @param $query
* @param $column
* @param $value
* @param string $boolean
* @return mixed
*/
Expand All @@ -132,9 +132,9 @@ public function scopeWhereBeginsWith($query, $column, $value, $boolean = 'and')
/**
* WHERE $column LIKE %$value query.
*
* @param $query
* @param $column
* @param $value
* @param $query
* @param $column
* @param $value
* @param string $boolean
* @return mixed
*/
Expand Down
46 changes: 23 additions & 23 deletions src/ModelFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ abstract class ModelFilter
/**
* ModelFilter constructor.
*
* @param $query
* @param $query
* @param array $input
* @param bool $relationsEnabled
*/
Expand All @@ -99,8 +99,8 @@ public function __construct($query, array $input = [], $relationsEnabled = true)
}

/**
* @param $method
* @param $args
* @param $method
* @param $args
* @return mixed
*/
public function __call($method, $args)
Expand Down Expand Up @@ -154,7 +154,7 @@ public function handle()
/**
* Locally defines a relation filter method that will be called in the context of the related model.
*
* @param $relation
* @param $relation
* @param \Closure $closure
* @return $this
*/
Expand All @@ -168,8 +168,8 @@ public function addRelated($relation, \Closure $closure)
/**
* Add a where constraint to a relationship.
*
* @param $relation
* @param $column
* @param $relation
* @param $column
* @param string|null $operator
* @param string|null $value
* @param string $boolean
Expand All @@ -193,7 +193,7 @@ public function related($relation, $column, $operator = null, $value = null, $bo
}

/**
* @param $key
* @param $key
* @return string
*/
public function getFilterMethod($key)
Expand Down Expand Up @@ -276,8 +276,8 @@ public function getRelationConstraints($relation)
/**
* Call setup method for relation before filtering on it.
*
* @param $related
* @param $query
* @param $related
* @param $query
*/
public function callRelatedLocalSetup($related, $query)
{
Expand All @@ -289,7 +289,7 @@ public function callRelatedLocalSetup($related, $query)
/**
* Run the filter on models that already have their tables joined.
*
* @param $related
* @param $related
*/
public function filterJoinedRelation($related)
{
Expand Down Expand Up @@ -333,7 +333,7 @@ public function getJoinedTables()
/**
* Checks if the relation to filter's table is already joined.
*
* @param $relation
* @param $relation
* @return bool
*/
public function relationIsJoined($relation)
Expand All @@ -348,7 +348,7 @@ public function relationIsJoined($relation)
/**
* Get an empty instance of a related model.
*
* @param $relation
* @param $relation
* @return \Illuminate\Database\Eloquent\Model
*/
public function getRelatedModel($relation)
Expand All @@ -361,7 +361,7 @@ public function getRelatedModel($relation)
}

/**
* @param $relationString
* @param $relationString
* @return QueryBuilder|\Illuminate\Database\Eloquent\Model
*/
protected function getNestedRelatedModel($relationString)
Expand All @@ -380,7 +380,7 @@ protected function getNestedRelatedModel($relationString)
/**
* Get the table name from a relationship.
*
* @param $relation
* @param $relation
* @return string
*/
public function getRelatedTable($relation)
Expand All @@ -391,7 +391,7 @@ public function getRelatedTable($relation)
/**
* Get the model filter of a related model.
*
* @param $relation
* @param $relation
* @return mixed
*/
public function getRelatedFilter($relation)
Expand All @@ -402,7 +402,7 @@ public function getRelatedFilter($relation)
/**
* Filters by a relationship that isn't joined by using that relation's ModelFilter.
*
* @param $related
* @param $related
*/
public function filterUnjoinedRelation($related)
{
Expand All @@ -426,7 +426,7 @@ public function filterUnjoinedRelation($related)
/**
* Get input to pass to a related Model's Filter.
*
* @param $related
* @param $related
* @return array
*/
public function getRelatedFilterInput($related)
Expand Down Expand Up @@ -455,7 +455,7 @@ public function getRelatedFilterInput($related)
/**
* Check to see if there is input or locally defined methods for the given relation.
*
* @param $relation
* @param $relation
* @return bool
*/
public function relationIsFilterable($relation)
Expand All @@ -466,7 +466,7 @@ public function relationIsFilterable($relation)
/**
* Checks if there is input that should be passed to a related Model Filter.
*
* @param $related
* @param $related
* @return bool
*/
public function relationUsesFilter($related)
Expand All @@ -477,7 +477,7 @@ public function relationUsesFilter($related)
/**
* Checks to see if there are locally defined relations to filter.
*
* @param $related
* @param $related
* @return bool
*/
public function relationIsLocal($related)
Expand Down Expand Up @@ -548,7 +548,7 @@ public function relationsEnabled()
* Add values to filter by if called in setup().
* Will ONLY filter relations if called on additional method.
*
* @param $key
* @param $key
* @param null $value
*/
public function push($key, $value = null)
Expand Down Expand Up @@ -619,7 +619,7 @@ public function whitelistMethod($method)
}

/**
* @param $method
* @param $method
* @return bool
*/
public function methodIsBlacklisted($method)
Expand All @@ -630,7 +630,7 @@ public function methodIsBlacklisted($method)
/**
* Check if the method is not blacklisted and callable on the extended class.
*
* @param $method
* @param $method
* @return bool
*/
public function methodIsCallable($method)
Expand Down
Loading