summaryrefslogtreecommitdiff
path: root/vendor/ruflin/elastica/lib/Elastica/Aggregation/GeohashGrid.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/ruflin/elastica/lib/Elastica/Aggregation/GeohashGrid.php')
-rw-r--r--vendor/ruflin/elastica/lib/Elastica/Aggregation/GeohashGrid.php41
1 files changed, 24 insertions, 17 deletions
diff --git a/vendor/ruflin/elastica/lib/Elastica/Aggregation/GeohashGrid.php b/vendor/ruflin/elastica/lib/Elastica/Aggregation/GeohashGrid.php
index 840198c3..e7a40471 100644
--- a/vendor/ruflin/elastica/lib/Elastica/Aggregation/GeohashGrid.php
+++ b/vendor/ruflin/elastica/lib/Elastica/Aggregation/GeohashGrid.php
@@ -1,16 +1,15 @@
<?php
-
namespace Elastica\Aggregation;
/**
- * Class GeohashGrid
- * @package Elastica\Aggregation
- * @link http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-aggregations-bucket-geohashgrid-aggregation.html
+ * Class GeohashGrid.
+ *
+ * @link http://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-geohashgrid-aggregation.html
*/
class GeohashGrid extends AbstractAggregation
{
/**
- * @param string $name the name of this aggregation
+ * @param string $name the name of this aggregation
* @param string $field the field on which to perform this aggregation
*/
public function __construct($name, $field)
@@ -20,9 +19,11 @@ class GeohashGrid extends AbstractAggregation
}
/**
- * Set the field for this aggregation
+ * Set the field for this aggregation.
+ *
* @param string $field the name of the document field on which to perform this aggregation
- * @return GeohashGrid
+ *
+ * @return $this
*/
public function setField($field)
{
@@ -30,32 +31,38 @@ class GeohashGrid extends AbstractAggregation
}
/**
- * Set the precision for this aggregation
+ * Set the precision for this aggregation.
+ *
* @param int $precision an integer between 1 and 12, inclusive. Defaults to 5.
- * @return GeohashGrid
+ *
+ * @return $this
*/
public function setPrecision($precision)
{
- return $this->setParam("precision", $precision);
+ return $this->setParam('precision', $precision);
}
/**
- * Set the maximum number of buckets to return
+ * Set the maximum number of buckets to return.
+ *
* @param int $size defaults to 10,000
- * @return GeohashGrid
+ *
+ * @return $this
*/
public function setSize($size)
{
- return $this->setParam("size", $size);
+ return $this->setParam('size', $size);
}
/**
- * Set the number of results returned from each shard
+ * Set the number of results returned from each shard.
+ *
* @param int $shardSize
- * @return GeohashGrid
+ *
+ * @return $this
*/
public function setShardSize($shardSize)
{
- return $this->setParam("shard_size", $shardSize);
+ return $this->setParam('shard_size', $shardSize);
}
-} \ No newline at end of file
+}