Skip to content
This repository has been archived by the owner on Nov 4, 2021. It is now read-only.

Commit

Permalink
Enforce Laravel param spacing. (#319)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasmichot committed Mar 19, 2020
1 parent 2821233 commit 2cd14d7
Show file tree
Hide file tree
Showing 18 changed files with 91 additions and 92 deletions.
68 changes: 34 additions & 34 deletions src/Builders/FilterBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ class FilterBuilder extends Builder
/**
* FilterBuilder constructor.
*
* @param \Illuminate\Database\Eloquent\Model $model
* @param callable|null $callback
* @param bool $softDelete
* @param \Illuminate\Database\Eloquent\Model $model
* @param callable|null $callback
* @param bool $softDelete
* @return void
*/
public function __construct(Model $model, $callback = null, $softDelete = false)
Expand All @@ -75,8 +75,8 @@ public function __construct(Model $model, $callback = null, $softDelete = false)
* @see https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-range-query.html Range query
*
* Supported operators are =, >, <, >=, <=, <>
* @param string $field Field name
* @param mixed $value Scalar value or an array
* @param string $field Field name
* @param mixed $value Scalar value or an array
* @return $this
*/
public function where($field, $value)
Expand Down Expand Up @@ -156,8 +156,8 @@ public function where($field, $value)
*
* @see https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-terms-query.html Terms query
*
* @param string $field
* @param array $value
* @param string $field
* @param array $value
* @return $this
*/
public function whereIn($field, array $value)
Expand All @@ -176,8 +176,8 @@ public function whereIn($field, array $value)
*
* @see https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-terms-query.html Terms query
*
* @param string $field
* @param array $value
* @param string $field
* @param array $value
* @return $this
*/
public function whereNotIn($field, array $value)
Expand All @@ -196,8 +196,8 @@ public function whereNotIn($field, array $value)
*
* @see https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-range-query.html Range query
*
* @param string $field
* @param array $value
* @param string $field
* @param array $value
* @return $this
*/
public function whereBetween($field, array $value)
Expand All @@ -219,8 +219,8 @@ public function whereBetween($field, array $value)
*
* @see https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-range-query.html Range query
*
* @param string $field
* @param array $value
* @param string $field
* @param array $value
* @return $this
*/
public function whereNotBetween($field, array $value)
Expand All @@ -242,7 +242,7 @@ public function whereNotBetween($field, array $value)
*
* @see https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-exists-query.html Exists query
*
* @param string $field
* @param string $field
* @return $this
*/
public function whereExists($field)
Expand All @@ -261,7 +261,7 @@ public function whereExists($field)
*
* @see https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-exists-query.html Exists query
*
* @param string $field
* @param string $field
* @return $this
*/
public function whereNotExists($field)
Expand All @@ -280,9 +280,9 @@ public function whereNotExists($field)
*
* @see https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-regexp-query.html Regexp query
*
* @param string $field
* @param string $value
* @param string $flags
* @param string $field
* @param string $value
* @param string $flags
* @return $this
*/
public function whereRegexp($field, $value, $flags = 'ALL')
Expand All @@ -304,9 +304,9 @@ public function whereRegexp($field, $value, $flags = 'ALL')
*
* @see https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-geo-distance-query.html Geo distance query
*
* @param string $field
* @param string|array $value
* @param int|string $distance
* @param string $field
* @param string|array $value
* @param int|string $distance
* @return $this
*/
public function whereGeoDistance($field, $value, $distance)
Expand All @@ -326,8 +326,8 @@ public function whereGeoDistance($field, $value, $distance)
*
* @see https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-geo-bounding-box-query.html Geo bounding box query
*
* @param string $field
* @param array $value
* @param string $field
* @param array $value
* @return $this
*/
public function whereGeoBoundingBox($field, array $value)
Expand All @@ -346,8 +346,8 @@ public function whereGeoBoundingBox($field, array $value)
*
* @see https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-geo-polygon-query.html Geo polygon query
*
* @param string $field
* @param array $points
* @param string $field
* @param array $points
* @return $this
*/
public function whereGeoPolygon($field, array $points)
Expand All @@ -368,9 +368,9 @@ public function whereGeoPolygon($field, array $points)
*
* @see https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-geo-shape-query.html Querying Geo Shapes
*
* @param string $field
* @param array $shape
* @param string $relation
* @param string $field
* @param array $shape
* @param string $relation
* @return $this
*/
public function whereGeoShape($field, array $shape, $relation = 'INTERSECTS')
Expand All @@ -390,8 +390,8 @@ public function whereGeoShape($field, array $shape, $relation = 'INTERSECTS')
/**
* Add a orderBy clause.
*
* @param string $field
* @param string $direction
* @param string $field
* @param string $direction
* @return $this
*/
public function orderBy($field, $direction = 'asc')
Expand Down Expand Up @@ -442,7 +442,7 @@ public function buildPayload()
/**
* Eager load some some relations.
*
* @param array|string $relations
* @param array|string $relations
* @return $this
*/
public function with($relations)
Expand All @@ -455,7 +455,7 @@ public function with($relations)
/**
* Set the query offset.
*
* @param int $offset
* @param int $offset
* @return $this
*/
public function from($offset)
Expand Down Expand Up @@ -498,7 +498,7 @@ public function paginate($perPage = null, $pageName = 'page', $page = null)
/**
* Collapse by a field.
*
* @param string $field
* @param string $field
* @return $this
*/
public function collapse(string $field)
Expand All @@ -511,7 +511,7 @@ public function collapse(string $field)
/**
* Select one or many fields.
*
* @param mixed $fields
* @param mixed $fields
* @return $this
*/
public function select($fields)
Expand Down
10 changes: 5 additions & 5 deletions src/Builders/SearchBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ class SearchBuilder extends FilterBuilder
/**
* SearchBuilder constructor.
*
* @param \Illuminate\Database\Eloquent\Model $model
* @param string $query
* @param callable|null $callback
* @param bool $softDelete
* @param \Illuminate\Database\Eloquent\Model $model
* @param string $query
* @param callable|null $callback
* @param bool $softDelete
* @return void
*/
public function __construct(Model $model, $query, $callback = null, $softDelete = false)
Expand All @@ -32,7 +32,7 @@ public function __construct(Model $model, $query, $callback = null, $softDelete
/**
* Add a rule.
*
* @param string|callable $rule Search rule class name or function
* @param string|callable $rule Search rule class name or function
* @return $this
*/
public function rule($rule)
Expand Down
3 changes: 1 addition & 2 deletions src/Console/ElasticIndexDropCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
use Illuminate\Console\Command;
use ScoutElastic\Console\Features\RequiresIndexConfiguratorArgument;
use ScoutElastic\Facades\ElasticClient;
use ScoutElastic\IndexConfigurator;
use ScoutElastic\Migratable;
use ScoutElastic\Payloads\RawPayload;

Expand Down Expand Up @@ -47,7 +46,7 @@ public function handle()
}

/**
* @param IndexConfigurator $configurator
* @param \ScoutElastic\IndexConfigurator $configurator
* @return string
*/
protected function resolveIndexName($configurator)
Expand Down
8 changes: 4 additions & 4 deletions src/Console/ElasticMigrateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ protected function updateTargetIndexMapping()
/**
* Check if an alias exists.
*
* @param string $name
* @param string $name
* @return bool
*/
protected function isAliasExists($name)
Expand All @@ -190,7 +190,7 @@ protected function isAliasExists($name)
/**
* Get an alias.
*
* @param string $name
* @param string $name
* @return array
*/
protected function getAlias($name)
Expand All @@ -206,7 +206,7 @@ protected function getAlias($name)
/**
* Delete an alias.
*
* @param string $name
* @param string $name
* @return void
*/
protected function deleteAlias($name)
Expand Down Expand Up @@ -237,7 +237,7 @@ protected function deleteAlias($name)
/**
* Create an alias for the target index.
*
* @param string $name
* @param string $name
* @return void
*/
protected function createAliasForTargetIndex($name)
Expand Down
2 changes: 1 addition & 1 deletion src/Console/SearchableModelMakeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ protected function getSearchRule()
/**
* Build the class.
*
* @param string $name
* @param string $name
* @return string
*/
protected function buildClass($name)
Expand Down
22 changes: 11 additions & 11 deletions src/ElasticEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ class ElasticEngine extends Engine
/**
* ElasticEngine constructor.
*
* @param \ScoutElastic\Indexers\IndexerInterface $indexer
* @param bool $updateMapping
* @param \ScoutElastic\Indexers\IndexerInterface $indexer
* @param bool $updateMapping
* @return void
*/
public function __construct(IndexerInterface $indexer, $updateMapping)
Expand Down Expand Up @@ -91,8 +91,8 @@ public function delete($models)
/**
* Build the payload collection.
*
* @param \Laravel\Scout\Builder $builder
* @param array $options
* @param \Laravel\Scout\Builder $builder
* @param array $options
* @return \Illuminate\Support\Collection
*/
public function buildSearchQueryPayloadCollection(Builder $builder, array $options = [])
Expand Down Expand Up @@ -159,8 +159,8 @@ public function buildSearchQueryPayloadCollection(Builder $builder, array $optio
/**
* Perform the search.
*
* @param \Laravel\Scout\Builder $builder
* @param array $options
* @param \Laravel\Scout\Builder $builder
* @param array $options
* @return array|mixed
*/
protected function performSearch(Builder $builder, array $options = [])
Expand Down Expand Up @@ -214,7 +214,7 @@ public function paginate(Builder $builder, $perPage, $page)
/**
* Explain the search.
*
* @param \Laravel\Scout\Builder $builder
* @param \Laravel\Scout\Builder $builder
* @return array|mixed
*/
public function explain(Builder $builder)
Expand All @@ -227,7 +227,7 @@ public function explain(Builder $builder)
/**
* Profile the search.
*
* @param \Laravel\Scout\Builder $builder
* @param \Laravel\Scout\Builder $builder
* @return array|mixed
*/
public function profile(Builder $builder)
Expand All @@ -240,7 +240,7 @@ public function profile(Builder $builder)
/**
* Return the number of documents found.
*
* @param \Laravel\Scout\Builder $builder
* @param \Laravel\Scout\Builder $builder
* @return int
*/
public function count(Builder $builder)
Expand All @@ -265,8 +265,8 @@ public function count(Builder $builder)
/**
* Make a raw search.
*
* @param \Illuminate\Database\Eloquent\Model $model
* @param array $query
* @param \Illuminate\Database\Eloquent\Model $model
* @param array $query
* @return mixed
*/
public function searchRaw(Model $model, $query)
Expand Down
4 changes: 2 additions & 2 deletions src/Highlight.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Highlight
/**
* Highlight constructor.
*
* @param array $highlight
* @param array $highlight
* @return void
*/
public function __construct(array $highlight)
Expand All @@ -25,7 +25,7 @@ public function __construct(array $highlight)
/**
* Get a value.
*
* @param string $key
* @param string $key
* @return mixed|string|null
*/
public function __get($key)
Expand Down
4 changes: 2 additions & 2 deletions src/Indexers/IndexerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ interface IndexerInterface
/**
* Update documents.
*
* @param \Illuminate\Database\Eloquent\Collection $models
* @param \Illuminate\Database\Eloquent\Collection $models
* @return array
*/
public function update(Collection $models);

/**
* Delete documents.
*
* @param \Illuminate\Database\Eloquent\Collection $models
* @param \Illuminate\Database\Eloquent\Collection $models
* @return array
*/
public function delete(Collection $models);
Expand Down
2 changes: 1 addition & 1 deletion src/Payloads/DocumentPayload.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class DocumentPayload extends TypePayload
/**
* DocumentPayload constructor.
*
* @param \Illuminate\Database\Eloquent\Model $model
* @param \Illuminate\Database\Eloquent\Model $model
* @throws \Exception
* @return void
*/
Expand Down
Loading

0 comments on commit 2cd14d7

Please sign in to comment.