summaryrefslogtreecommitdiff
path: root/vendor/ruflin/elastica/lib/Elastica/Filter/GeohashCell.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/ruflin/elastica/lib/Elastica/Filter/GeohashCell.php')
-rw-r--r--vendor/ruflin/elastica/lib/Elastica/Filter/GeohashCell.php32
1 files changed, 17 insertions, 15 deletions
diff --git a/vendor/ruflin/elastica/lib/Elastica/Filter/GeohashCell.php b/vendor/ruflin/elastica/lib/Elastica/Filter/GeohashCell.php
index d14b25fe..dd147152 100644
--- a/vendor/ruflin/elastica/lib/Elastica/Filter/GeohashCell.php
+++ b/vendor/ruflin/elastica/lib/Elastica/Filter/GeohashCell.php
@@ -1,20 +1,18 @@
<?php
-
namespace Elastica\Filter;
-
/**
- * Class GeohashCell
- * @package Elastica
- * @link http://www.elasticsearch.org/guide/reference/query-dsl/geohash-cell-filter/
+ * Class GeohashCell.
+ *
+ * @link http://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-geohash-cell-filter.html
*/
class GeohashCell extends AbstractGeoDistance
{
/**
- * @param string $key The field on which to filter
- * @param array|string $location Location as coordinates array or geohash string ['lat' => 40.3, 'lon' => 45.2]
- * @param $precision Integer length of geohash prefix or distance (3, or "50m")
- * @param bool $neighbors If true, filters cells next to the given cell.
+ * @param string $key The field on which to filter
+ * @param array|string $location Location as coordinates array or geohash string ['lat' => 40.3, 'lon' => 45.2]
+ * @param string|int $precision Integer length of geohash prefix or distance (3, or "50m")
+ * @param bool $neighbors If true, filters cells next to the given cell.
*/
public function __construct($key, $location, $precision = -1, $neighbors = false)
{
@@ -24,9 +22,11 @@ class GeohashCell extends AbstractGeoDistance
}
/**
- * Set the precision for this filter
+ * Set the precision for this filter.
+ *
* @param string|int $precision Integer length of geohash prefix or distance (3, or "50m")
- * @return \Elastica\Filter\GeohashCell
+ *
+ * @return $this
*/
public function setPrecision($precision)
{
@@ -34,12 +34,14 @@ class GeohashCell extends AbstractGeoDistance
}
/**
- * Set the neighbors option for this filter
+ * Set the neighbors option for this filter.
+ *
* @param bool $neighbors If true, filters cells next to the given cell.
- * @return \Elastica\Filter\GeohashCell
+ *
+ * @return $this
*/
public function setNeighbors($neighbors)
{
- return $this->setParam('neighbors', (bool)$neighbors);
+ return $this->setParam('neighbors', (bool) $neighbors);
}
-} \ No newline at end of file
+}