From 2c549d20b9dfaeec93444b61455f2c9ac6c3521f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simonas=20=C5=A0erlinskas?= <simonas.serlinskas@nfq.com> Date: Thu, 8 Sep 2016 10:55:18 +0300 Subject: [PATCH] added return $this and removed default null value in query setter --- src/InnerHit/NestedInnerHit.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/InnerHit/NestedInnerHit.php b/src/InnerHit/NestedInnerHit.php index fb9a8d4..1fdeb0a 100644 --- a/src/InnerHit/NestedInnerHit.php +++ b/src/InnerHit/NestedInnerHit.php @@ -65,10 +65,14 @@ class NestedInnerHit implements BuilderInterface /** * @param string $path + * + * @return $this */ public function setPath($path) { $this->path = $path; + + return $this; } /** @@ -81,10 +85,14 @@ class NestedInnerHit implements BuilderInterface /** * @param BuilderInterface $query + * + * @return $this */ - public function setQuery(BuilderInterface $query = null) + public function setQuery(BuilderInterface $query) { $this->query = $query; + + return $this; } /** @@ -99,6 +107,8 @@ class NestedInnerHit implements BuilderInterface * Adds a sub-innerHit. * * @param NestedInnerHit $innerHit + * + * @return $this */ public function addInnerHit(NestedInnerHit $innerHit) { @@ -107,6 +117,8 @@ class NestedInnerHit implements BuilderInterface } $this->innerHits->add($innerHit); + + return $this; } /** -- GitLab