-
Notifications
You must be signed in to change notification settings - Fork 736
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Apply linting php-cs-fixer command to cleanup files
- Loading branch information
Showing
380 changed files
with
4,373 additions
and
3,705 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,12 @@ | ||
<?php | ||
|
||
namespace Elastica; | ||
|
||
/** | ||
* Base class for things that can be sent to the update api (Document and | ||
* Script). | ||
* | ||
* @category Xodoa | ||
* @package Elastica | ||
* | ||
* @author Nik Everett <[email protected]> | ||
*/ | ||
class AbstractUpdateAction extends Param | ||
|
@@ -20,7 +19,8 @@ class AbstractUpdateAction extends Param | |
/** | ||
* Sets the id of the document. | ||
* | ||
* @param string $id | ||
* @param string $id | ||
* | ||
* @return $this | ||
*/ | ||
public function setId($id) | ||
|
@@ -29,7 +29,7 @@ public function setId($id) | |
} | ||
|
||
/** | ||
* Returns document id | ||
* Returns document id. | ||
* | ||
* @return string|int Document id | ||
*/ | ||
|
@@ -47,9 +47,10 @@ public function hasId() | |
} | ||
|
||
/** | ||
* Sets lifetime of document | ||
* Sets lifetime of document. | ||
* | ||
* @param string $ttl | ||
* | ||
* @param string $ttl | ||
* @return $this | ||
*/ | ||
public function setTtl($ttl) | ||
|
@@ -74,9 +75,10 @@ public function hasTtl() | |
} | ||
|
||
/** | ||
* Sets the document type name | ||
* Sets the document type name. | ||
* | ||
* @param string $type Type name | ||
* | ||
* @param string $type Type name | ||
* @return $this | ||
*/ | ||
public function setType($type) | ||
|
@@ -90,7 +92,7 @@ public function setType($type) | |
} | ||
|
||
/** | ||
* Return document type name | ||
* Return document type name. | ||
* | ||
* @throws \Elastica\Exception\InvalidException | ||
* | ||
|
@@ -102,9 +104,10 @@ public function getType() | |
} | ||
|
||
/** | ||
* Sets the document index name | ||
* Sets the document index name. | ||
* | ||
* @param string $index Index name | ||
* | ||
* @param string $index Index name | ||
* @return $this | ||
*/ | ||
public function setIndex($index) | ||
|
@@ -117,7 +120,7 @@ public function setIndex($index) | |
} | ||
|
||
/** | ||
* Get the document index name | ||
* Get the document index name. | ||
* | ||
* @throws \Elastica\Exception\InvalidException | ||
* | ||
|
@@ -129,10 +132,12 @@ public function getIndex() | |
} | ||
|
||
/** | ||
* Sets the version of a document for use with optimistic concurrency control | ||
* Sets the version of a document for use with optimistic concurrency control. | ||
* | ||
* @param int $version Document version | ||
* | ||
* @param int $version Document version | ||
* @return $this | ||
* | ||
* @link https://www.elastic.co/blog/versioning | ||
*/ | ||
public function setVersion($version) | ||
|
@@ -141,7 +146,7 @@ public function setVersion($version) | |
} | ||
|
||
/** | ||
* Returns document version | ||
* Returns document version. | ||
* | ||
* @return string|int Document version | ||
*/ | ||
|
@@ -160,9 +165,10 @@ public function hasVersion() | |
|
||
/** | ||
* Sets the version_type of a document | ||
* Default in ES is internal, but you can set to external to use custom versioning | ||
* Default in ES is internal, but you can set to external to use custom versioning. | ||
* | ||
* @param int $versionType Document version type | ||
* | ||
* @param int $versionType Document version type | ||
* @return $this | ||
*/ | ||
public function setVersionType($versionType) | ||
|
@@ -171,7 +177,7 @@ public function setVersionType($versionType) | |
} | ||
|
||
/** | ||
* Returns document version type | ||
* Returns document version type. | ||
* | ||
* @return string|int Document version type | ||
*/ | ||
|
@@ -189,10 +195,12 @@ public function hasVersionType() | |
} | ||
|
||
/** | ||
* Sets parent document id | ||
* Sets parent document id. | ||
* | ||
* @param string|int $parent Parent document id | ||
* | ||
* @param string|int $parent Parent document id | ||
* @return $this | ||
* | ||
* @link http://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-parent-field.html | ||
*/ | ||
public function setParent($parent) | ||
|
@@ -201,7 +209,7 @@ public function setParent($parent) | |
} | ||
|
||
/** | ||
* Returns the parent document id | ||
* Returns the parent document id. | ||
* | ||
* @return string|int Parent document id | ||
*/ | ||
|
@@ -219,9 +227,10 @@ public function hasParent() | |
} | ||
|
||
/** | ||
* Set operation type | ||
* Set operation type. | ||
* | ||
* @param string $opType Only accept create | ||
* | ||
* @param string $opType Only accept create | ||
* @return $this | ||
*/ | ||
public function setOpType($opType) | ||
|
@@ -230,7 +239,8 @@ public function setOpType($opType) | |
} | ||
|
||
/** | ||
* Get operation type | ||
* Get operation type. | ||
* | ||
* @return string | ||
*/ | ||
public function getOpType() | ||
|
@@ -247,9 +257,10 @@ public function hasOpType() | |
} | ||
|
||
/** | ||
* Set percolate query param | ||
* Set percolate query param. | ||
* | ||
* @param string $value percolator filter | ||
* | ||
* @param string $value percolator filter | ||
* @return $this | ||
*/ | ||
public function setPercolate($value = '*') | ||
|
@@ -258,7 +269,7 @@ public function setPercolate($value = '*') | |
} | ||
|
||
/** | ||
* Get percolate parameter | ||
* Get percolate parameter. | ||
* | ||
* @return string | ||
*/ | ||
|
@@ -276,9 +287,10 @@ public function hasPercolate() | |
} | ||
|
||
/** | ||
* Set routing query param | ||
* Set routing query param. | ||
* | ||
* @param string $value routing | ||
* | ||
* @param string $value routing | ||
* @return $this | ||
*/ | ||
public function setRouting($value) | ||
|
@@ -287,7 +299,7 @@ public function setRouting($value) | |
} | ||
|
||
/** | ||
* Get routing parameter | ||
* Get routing parameter. | ||
* | ||
* @return string | ||
*/ | ||
|
@@ -305,7 +317,8 @@ public function hasRouting() | |
} | ||
|
||
/** | ||
* @param array|string $fields | ||
* @param array|string $fields | ||
* | ||
* @return $this | ||
*/ | ||
public function setFields($fields) | ||
|
@@ -342,7 +355,8 @@ public function hasFields() | |
} | ||
|
||
/** | ||
* @param int $num | ||
* @param int $num | ||
* | ||
* @return $this | ||
*/ | ||
public function setRetryOnConflict($num) | ||
|
@@ -367,7 +381,8 @@ public function hasRetryOnConflict() | |
} | ||
|
||
/** | ||
* @param string $timestamp | ||
* @param string $timestamp | ||
* | ||
* @return $this | ||
*/ | ||
public function setTimestamp($timestamp) | ||
|
@@ -392,7 +407,8 @@ public function hasTimestamp() | |
} | ||
|
||
/** | ||
* @param bool $refresh | ||
* @param bool $refresh | ||
* | ||
* @return $this | ||
*/ | ||
public function setRefresh($refresh = true) | ||
|
@@ -417,7 +433,8 @@ public function hasRefresh() | |
} | ||
|
||
/** | ||
* @param string $timeout | ||
* @param string $timeout | ||
* | ||
* @return $this | ||
*/ | ||
public function setTimeout($timeout) | ||
|
@@ -442,7 +459,8 @@ public function hasTimeout() | |
} | ||
|
||
/** | ||
* @param string $timeout | ||
* @param string $timeout | ||
* | ||
* @return $this | ||
*/ | ||
public function setConsistency($timeout) | ||
|
@@ -467,7 +485,8 @@ public function hasConsistency() | |
} | ||
|
||
/** | ||
* @param string $timeout | ||
* @param string $timeout | ||
* | ||
* @return $this | ||
*/ | ||
public function setReplication($timeout) | ||
|
@@ -492,7 +511,8 @@ public function hasReplication() | |
} | ||
|
||
/** | ||
* @param \Elastica\Document|array $data | ||
* @param \Elastica\Document|array $data | ||
* | ||
* @return $this | ||
*/ | ||
public function setUpsert($data) | ||
|
@@ -520,8 +540,9 @@ public function hasUpsert() | |
} | ||
|
||
/** | ||
* @param array $fields if empty array all options will be returned, field names can be either with underscored either without, i.e. _percolate, routing | ||
* @param bool $withUnderscore should option keys contain underscore prefix | ||
* @param array $fields if empty array all options will be returned, field names can be either with underscored either without, i.e. _percolate, routing | ||
* @param bool $withUnderscore should option keys contain underscore prefix | ||
* | ||
* @return array | ||
*/ | ||
public function getOptions(array $fields = array(), $withUnderscore = false) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.