Skip to content

Commit

Permalink
Cleanup linting (#1385)
Browse files Browse the repository at this point in the history
  • Loading branch information
ruflin authored Oct 5, 2017
1 parent 81123eb commit e140c86
Show file tree
Hide file tree
Showing 73 changed files with 337 additions and 339 deletions.
8 changes: 4 additions & 4 deletions lib/Elastica/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -305,8 +305,8 @@ public function removeHeader($header)
*
* @link https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-bulk.html
*
* @param array|\Elastica\Document[] $docs Array of Elastica\Document
* @param array $requestParams
* @param array|\Elastica\Document[] $docs Array of Elastica\Document
* @param array $requestParams
*
* @throws \Elastica\Exception\InvalidException If docs is empty
*
Expand Down Expand Up @@ -337,8 +337,8 @@ public function updateDocuments(array $docs, array $requestParams = [])
*
* @link https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-bulk.html
*
* @param array|\Elastica\Document[] $docs Array of Elastica\Document
* @param array $requestParams
* @param array|\Elastica\Document[] $docs Array of Elastica\Document
* @param array $requestParams
*
* @throws \Elastica\Exception\InvalidException If docs is empty
*
Expand Down
2 changes: 1 addition & 1 deletion lib/Elastica/Index.php
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ public function requestEndpoint(AbstractEndpoint $endpoint)
* Detailed arguments can be found here in the link
*
* @param array $body String to be analyzed
* @param array $args OPTIONAL Additional arguments
* @param array $args OPTIONAL Additional arguments
*
* @return array Server response
*
Expand Down
17 changes: 11 additions & 6 deletions lib/Elastica/Pipeline.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@
* Handles Pipeline management & definition.
*
* @author Federico Panini <fpanini@gmail.com>
*
* @link https://www.elastic.co/guide/en/elasticsearch/reference/current/ingest-processors.html
*/
class Pipeline extends Param
{
/**
* @var string $id name of the pipeline
* @var string name of the pipeline
*/
protected $id;

Expand All @@ -32,17 +33,16 @@ class Pipeline extends Param
protected $_client;

/**
* Processors array
* Processors array.
*
* @var array $_processors
* @var array
*/
protected $_processors = [];

/**
* Create a new Pipeline Object.
*
* @param Client $client
*
*/
public function __construct(Client $client)
{
Expand All @@ -53,6 +53,7 @@ public function __construct(Client $client)
* Create a Pipeline.
*
* @return Response
*
* @link https://www.elastic.co/guide/en/elasticsearch/reference/current/put-pipeline-api.html
*/
public function create()
Expand All @@ -78,7 +79,9 @@ public function create()

/**
* Get a Pipeline Object.
*
* @param string $id Pipeline name
*
* @return Response
*
* @link https://www.elastic.co/guide/en/elasticsearch/reference/current/get-pipeline-api.html
Expand All @@ -95,6 +98,7 @@ public function getPipeline(string $id)
* Delete a Pipeline.
*
* @param string $id Pipeline name
*
* @return Response
*
* @link https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-pipeline-api.html
Expand All @@ -118,7 +122,7 @@ public function simulate()
/**
* Sets query as raw array. Will overwrite all already set arguments.
*
* @param array $processors array
* @param array $processors array
*
* @return $this
*/
Expand Down Expand Up @@ -192,6 +196,7 @@ public function setDescription(string $description)
public function toArray()
{
$this->_params['processors'] = [$this->_processors['processors']];

return $this->getParams();
}

Expand All @@ -218,4 +223,4 @@ public function requestEndpoint(AbstractEndpoint $endpoint)

return $this->getClient()->requestEndpoint($cloned);
}
}
}
4 changes: 2 additions & 2 deletions lib/Elastica/Processor/AbstractProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
* Elastica Prcessor object.
*
* @author Federico Panini <fpanini@gmail.com>
*
* @link https://www.elastic.co/guide/en/elasticsearch/reference/current/ingest-processors.html
*/
abstract class AbstractProcessor extends Param
{

}
}
7 changes: 4 additions & 3 deletions lib/Elastica/Processor/Append.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@
* Elastica Append Processor.
*
* @author Federico Panini <fpanini@gmail.com>
*
* @link https://www.elastic.co/guide/en/elasticsearch/reference/current/append-processor.html
*/
class Append extends AbstractProcessor
{
/**
* Append constructor.
*
* @param string $field field name
* @param string $field field name
* @param string|array $value field values to append
*/
public function __construct(string $field, $value)
Expand All @@ -34,7 +35,7 @@ public function setField(string $field)
}

/**
* Set field value
* Set field value.
*
* @param string|array $value
*
Expand All @@ -44,4 +45,4 @@ public function setValue($value)
{
return $this->setParam('value', $value);
}
}
}
4 changes: 2 additions & 2 deletions lib/Elastica/Processor/Attachment.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function setIndexedChars(int $indexedChars)
}

/**
* Set properties. Default all properties. Can be content, title, name, author, keywords, date, content_type, content_length, language
* Set properties. Default all properties. Can be content, title, name, author, keywords, date, content_type, content_length, language.
*
* @param array $properties
*
Expand All @@ -72,4 +72,4 @@ public function setIgnoreMissing(bool $ignoreMissing)
{
return $this->setParam('ignore_missing', $ignoreMissing);
}
}
}
3 changes: 2 additions & 1 deletion lib/Elastica/Processor/Convert.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* Elastica Convert Processor.
*
* @author Federico Panini <fpanini@gmail.com>
*
* @link https://www.elastic.co/guide/en/elasticsearch/reference/current/append-processor.html
*/
class Convert extends AbstractProcessor
Expand Down Expand Up @@ -62,4 +63,4 @@ public function setIgnoreMissing(bool $ignoreMissing)
{
return $this->setParam('ignore_missing', $ignoreMissing);
}
}
}
5 changes: 3 additions & 2 deletions lib/Elastica/Processor/Date.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* Elastica Date Processor.
*
* @author Federico Panini <fpanini@gmail.com>
*
* @link https://www.elastic.co/guide/en/elasticsearch/reference/current/date-processor.html
*/
class Date extends AbstractProcessor
Expand All @@ -13,7 +14,7 @@ class Date extends AbstractProcessor
* Date constructor.
*
* @param string $field
* @param array $formats
* @param array $formats
*/
public function __construct(string $field, array $formats)
{
Expand Down Expand Up @@ -80,4 +81,4 @@ public function setLocale(string $locale)
{
return $this->setParam('locale', $locale);
}
}
}
5 changes: 3 additions & 2 deletions lib/Elastica/Processor/DateIndexName.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* Elastica DateIndexName Processor.
*
* @author Federico Panini <fpanini@gmail.com>
*
* @link https://www.elastic.co/guide/en/elasticsearch/reference/current/date-index-name-processor.html
*/
class DateIndexName extends AbstractProcessor
Expand Down Expand Up @@ -70,7 +71,7 @@ public function setIndexNamePrefix(string $indexPrefixName)
}

/**
* Set format to be used when printing parsed date. An valid Joda pattern is expected here. Default yyyy-MM-dd
* Set format to be used when printing parsed date. An valid Joda pattern is expected here. Default yyyy-MM-dd.
*
* @param string $indexNameFormat
*
Expand Down Expand Up @@ -104,4 +105,4 @@ public function setLocale(string $locale)
{
return $this->setParam('locale', $locale);
}
}
}
3 changes: 2 additions & 1 deletion lib/Elastica/Processor/DotExpander.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* Elastica Rename Processor.
*
* @author Federico Panini <fpanini@gmail.com>
*
* @link https://www.elastic.co/guide/en/elasticsearch/reference/current/dot-expand-processor.html
*/
class DotExpander extends AbstractProcessor
Expand All @@ -25,4 +26,4 @@ public function setField(string $field)
{
return $this->setParam('field', $field);
}
}
}
4 changes: 3 additions & 1 deletion lib/Elastica/Processor/Fail.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@
* Elastica Fail Processor.
*
* @author Federico Panini <fpanini@gmail.com>
*
* @link https://www.elastic.co/guide/en/elasticsearch/reference/current/fail-processor.html
*/
class Fail extends AbstractProcessor
{
/**
* Fail constructor.
*
* @param string $message
*/
public function __construct(string $message)
Expand All @@ -29,4 +31,4 @@ public function setMessage(string $message)
{
return $this->setParam('message', $message);
}
}
}
3 changes: 2 additions & 1 deletion lib/Elastica/Processor/Join.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* Elastica Join Processor.
*
* @author Federico Panini <fpanini@gmail.com>
*
* @link https://www.elastic.co/guide/en/elasticsearch/reference/current/join-processor.html
*/
class Join extends AbstractProcessor
Expand Down Expand Up @@ -44,4 +45,4 @@ public function setSeparator(string $separator)
{
return $this->setParam('separator', $separator);
}
}
}
3 changes: 2 additions & 1 deletion lib/Elastica/Processor/Json.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* Elastica Json Processor.
*
* @author Federico Panini <fpanini@gmail.com>
*
* @link https://www.elastic.co/guide/en/elasticsearch/reference/current/json-processor.html
*/
class Json extends AbstractProcessor
Expand Down Expand Up @@ -49,4 +50,4 @@ public function setAddToRoot(bool $addToRoot)
{
return $this->setParam('add_to_root', $addToRoot);
}
}
}
3 changes: 2 additions & 1 deletion lib/Elastica/Processor/Kv.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* Elastica KV Processor.
*
* @author Federico Panini <fpanini@gmail.com>
*
* @link https://www.elastic.co/guide/en/elasticsearch/reference/current/kv-processor.html
*/
class Kv extends AbstractProcessor
Expand Down Expand Up @@ -106,4 +107,4 @@ public function setIgnoreMissing(bool $ignoreMissing)
{
return $this->setParam('ignore_missing', $ignoreMissing);
}
}
}
3 changes: 2 additions & 1 deletion lib/Elastica/Processor/Lowercase.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* Elastica Lowercase Processor.
*
* @author Federico Panini <fpanini@gmail.com>
*
* @link https://www.elastic.co/guide/en/elasticsearch/reference/current/lowercase-processor.html
*/
class Lowercase extends AbstractProcessor
Expand All @@ -30,4 +31,4 @@ public function setField(string $field)
{
return $this->setParam('field', $field);
}
}
}
3 changes: 2 additions & 1 deletion lib/Elastica/Processor/Remove.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* Elastica Remove Processor.
*
* @author Federico Panini <fpanini@gmail.com>
*
* @link https://www.elastic.co/guide/en/elasticsearch/reference/current/remove-processor.html
*/
class Remove extends AbstractProcessor
Expand All @@ -30,4 +31,4 @@ public function setField($field)
{
return $this->setParam('field', $field);
}
}
}
3 changes: 2 additions & 1 deletion lib/Elastica/Processor/Rename.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* Elastica Rename Processor.
*
* @author Federico Panini <fpanini@gmail.com>
*
* @link https://www.elastic.co/guide/en/elasticsearch/reference/current/rename-processor.html
*/
class Rename extends AbstractProcessor
Expand Down Expand Up @@ -56,4 +57,4 @@ public function setIgnoreMissing(bool $ignoreMissing)
{
return $this->setParam('ignore_missing', $ignoreMissing);
}
}
}
5 changes: 3 additions & 2 deletions lib/Elastica/Processor/Set.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* Elastica Set Processor.
*
* @author Federico Panini <fpanini@gmail.com>
*
* @link https://www.elastic.co/guide/en/elasticsearch/reference/current/ingest-processors.html
*/
class Set extends AbstractProcessor
Expand Down Expand Up @@ -34,7 +35,7 @@ public function setField(string $field)
}

/**
* Set field value
* Set field value.
*
* @param string $value
*
Expand All @@ -56,4 +57,4 @@ public function setOverride(bool $override)
{
return $this->setParam('override', $override);
}
}
}
Loading

0 comments on commit e140c86

Please sign in to comment.