From 59d6a52e39996ecafdbc1e6845b8537be5a7eb7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Gallego?= Date: Tue, 10 Feb 2015 22:03:51 +0100 Subject: [PATCH 1/2] Fix IDE doc --- lib/Elastica/Aggregation/AbstractAggregation.php | 2 +- lib/Elastica/Aggregation/AbstractSimpleAggregation.php | 4 ++-- lib/Elastica/Aggregation/Histogram.php | 6 +++--- lib/Elastica/Aggregation/Range.php | 4 ++-- lib/Elastica/Param.php | 6 +++--- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/lib/Elastica/Aggregation/AbstractAggregation.php b/lib/Elastica/Aggregation/AbstractAggregation.php index 4034690e88..e9332f9ab9 100644 --- a/lib/Elastica/Aggregation/AbstractAggregation.php +++ b/lib/Elastica/Aggregation/AbstractAggregation.php @@ -58,7 +58,7 @@ public function getAggs() * Add a sub-aggregation * @param AbstractAggregation $aggregation * @throws \Elastica\Exception\InvalidException - * @return AbstractAggregation + * @return static */ public function addAggregation(AbstractAggregation $aggregation) { diff --git a/lib/Elastica/Aggregation/AbstractSimpleAggregation.php b/lib/Elastica/Aggregation/AbstractSimpleAggregation.php index 5c4b76bc63..11bd392f8f 100644 --- a/lib/Elastica/Aggregation/AbstractSimpleAggregation.php +++ b/lib/Elastica/Aggregation/AbstractSimpleAggregation.php @@ -9,7 +9,7 @@ abstract class AbstractSimpleAggregation extends AbstractAggregation /** * Set the field for this aggregation * @param string $field the name of the document field on which to perform this aggregation - * @return AbstractSimpleAggregation + * @return static */ public function setField($field) { @@ -19,7 +19,7 @@ public function setField($field) /** * Set a script for this aggregation * @param string|Script $script - * @return AbstractSimpleAggregation + * @return static */ public function setScript($script) { diff --git a/lib/Elastica/Aggregation/Histogram.php b/lib/Elastica/Aggregation/Histogram.php index 7d4aa8d2e8..084bad3e18 100644 --- a/lib/Elastica/Aggregation/Histogram.php +++ b/lib/Elastica/Aggregation/Histogram.php @@ -24,7 +24,7 @@ public function __construct($name, $field, $interval) /** * Set the interval by which documents will be bucketed * @param int $interval - * @return Histogram + * @return static */ public function setInterval($interval) { @@ -35,7 +35,7 @@ public function setInterval($interval) * Set the bucket sort order * @param string $order "_count", "_term", or the name of a sub-aggregation or sub-aggregation response field * @param string $direction "asc" or "desc" - * @return Histogram + * @return static */ public function setOrder($order, $direction) { @@ -45,7 +45,7 @@ public function setOrder($order, $direction) /** * Set the minimum number of documents which must fall into a bucket in order for the bucket to be returned * @param int $count set to 0 to include empty buckets - * @return Histogram + * @return static */ public function setMinimumDocumentCount($count) { diff --git a/lib/Elastica/Aggregation/Range.php b/lib/Elastica/Aggregation/Range.php index 543033c772..c89aeca817 100644 --- a/lib/Elastica/Aggregation/Range.php +++ b/lib/Elastica/Aggregation/Range.php @@ -15,7 +15,7 @@ class Range extends AbstractSimpleAggregation * @param int|float $fromValue low end of this range, exclusive (greater than) * @param int|float $toValue high end of this range, exclusive (less than) * @param string $key customized key value - * @return Range + * @return static * @throws \Elastica\Exception\InvalidException */ public function addRange($fromValue = null, $toValue = null, $key = null) @@ -40,7 +40,7 @@ public function addRange($fromValue = null, $toValue = null, $key = null) /** * If set to true, a unique string key will be associated with each bucket, and ranges will be returned as an associative array * @param bool $keyed - * @return Range + * @return static */ public function setKeyedResponse($keyed = true) { diff --git a/lib/Elastica/Param.php b/lib/Elastica/Param.php index 2c14fed0f3..78b3f378ff 100644 --- a/lib/Elastica/Param.php +++ b/lib/Elastica/Param.php @@ -78,7 +78,7 @@ protected function _setRawParam($key, $value) * * @param string $key Key to set * @param mixed $value Key Value - * @return \Elastica\Param + * @return static */ public function setParam($key, $value) { @@ -91,7 +91,7 @@ public function setParam($key, $value) * Sets (overwrites) all params of this object * * @param array $params Parameter list - * @return \Elastica\Param + * @return static */ public function setParams(array $params) { @@ -107,7 +107,7 @@ public function setParams(array $params) * * @param string $key Param key * @param mixed $value Value to set - * @return \Elastica\Param + * @return static */ public function addParam($key, $value) { From c301d14f356e111e86a6658f6797310990778595 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Gallego?= Date: Tue, 10 Feb 2015 23:50:13 +0100 Subject: [PATCH 2/2] Change static to this --- lib/Elastica/Aggregation/AbstractAggregation.php | 2 +- lib/Elastica/Aggregation/AbstractSimpleAggregation.php | 4 ++-- lib/Elastica/Aggregation/Histogram.php | 6 +++--- lib/Elastica/Aggregation/Range.php | 4 ++-- lib/Elastica/Param.php | 6 +++--- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/lib/Elastica/Aggregation/AbstractAggregation.php b/lib/Elastica/Aggregation/AbstractAggregation.php index e9332f9ab9..523dbd5a39 100644 --- a/lib/Elastica/Aggregation/AbstractAggregation.php +++ b/lib/Elastica/Aggregation/AbstractAggregation.php @@ -58,7 +58,7 @@ public function getAggs() * Add a sub-aggregation * @param AbstractAggregation $aggregation * @throws \Elastica\Exception\InvalidException - * @return static + * @return $this */ public function addAggregation(AbstractAggregation $aggregation) { diff --git a/lib/Elastica/Aggregation/AbstractSimpleAggregation.php b/lib/Elastica/Aggregation/AbstractSimpleAggregation.php index 11bd392f8f..57b663d627 100644 --- a/lib/Elastica/Aggregation/AbstractSimpleAggregation.php +++ b/lib/Elastica/Aggregation/AbstractSimpleAggregation.php @@ -9,7 +9,7 @@ abstract class AbstractSimpleAggregation extends AbstractAggregation /** * Set the field for this aggregation * @param string $field the name of the document field on which to perform this aggregation - * @return static + * @return $this */ public function setField($field) { @@ -19,7 +19,7 @@ public function setField($field) /** * Set a script for this aggregation * @param string|Script $script - * @return static + * @return $this */ public function setScript($script) { diff --git a/lib/Elastica/Aggregation/Histogram.php b/lib/Elastica/Aggregation/Histogram.php index 084bad3e18..2626528f07 100644 --- a/lib/Elastica/Aggregation/Histogram.php +++ b/lib/Elastica/Aggregation/Histogram.php @@ -24,7 +24,7 @@ public function __construct($name, $field, $interval) /** * Set the interval by which documents will be bucketed * @param int $interval - * @return static + * @return $this */ public function setInterval($interval) { @@ -35,7 +35,7 @@ public function setInterval($interval) * Set the bucket sort order * @param string $order "_count", "_term", or the name of a sub-aggregation or sub-aggregation response field * @param string $direction "asc" or "desc" - * @return static + * @return $this */ public function setOrder($order, $direction) { @@ -45,7 +45,7 @@ public function setOrder($order, $direction) /** * Set the minimum number of documents which must fall into a bucket in order for the bucket to be returned * @param int $count set to 0 to include empty buckets - * @return static + * @return $this */ public function setMinimumDocumentCount($count) { diff --git a/lib/Elastica/Aggregation/Range.php b/lib/Elastica/Aggregation/Range.php index c89aeca817..68d55c9e4e 100644 --- a/lib/Elastica/Aggregation/Range.php +++ b/lib/Elastica/Aggregation/Range.php @@ -15,7 +15,7 @@ class Range extends AbstractSimpleAggregation * @param int|float $fromValue low end of this range, exclusive (greater than) * @param int|float $toValue high end of this range, exclusive (less than) * @param string $key customized key value - * @return static + * @return $this * @throws \Elastica\Exception\InvalidException */ public function addRange($fromValue = null, $toValue = null, $key = null) @@ -40,7 +40,7 @@ public function addRange($fromValue = null, $toValue = null, $key = null) /** * If set to true, a unique string key will be associated with each bucket, and ranges will be returned as an associative array * @param bool $keyed - * @return static + * @return $this */ public function setKeyedResponse($keyed = true) { diff --git a/lib/Elastica/Param.php b/lib/Elastica/Param.php index 78b3f378ff..f84e69dab2 100644 --- a/lib/Elastica/Param.php +++ b/lib/Elastica/Param.php @@ -78,7 +78,7 @@ protected function _setRawParam($key, $value) * * @param string $key Key to set * @param mixed $value Key Value - * @return static + * @return $this */ public function setParam($key, $value) { @@ -91,7 +91,7 @@ public function setParam($key, $value) * Sets (overwrites) all params of this object * * @param array $params Parameter list - * @return static + * @return $this */ public function setParams(array $params) { @@ -107,7 +107,7 @@ public function setParams(array $params) * * @param string $key Param key * @param mixed $value Value to set - * @return static + * @return $this */ public function addParam($key, $value) {