Skip to content

Commit

Permalink
added return $this and removed default null value in query setter
Browse files Browse the repository at this point in the history
  • Loading branch information
Simonas Šerlinskas committed Sep 8, 2016
1 parent e84c380 commit 2c549d2
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/InnerHit/NestedInnerHit.php
Expand Up @@ -65,10 +65,14 @@ public function getPath()

/**
* @param string $path
*
* @return $this
*/
public function setPath($path)
{
$this->path = $path;

return $this;
}

/**
Expand All @@ -81,10 +85,14 @@ public function getQuery()

/**
* @param BuilderInterface $query
*
* @return $this
*/
public function setQuery(BuilderInterface $query = null)
public function setQuery(BuilderInterface $query)
{
$this->query = $query;

return $this;
}

/**
Expand All @@ -99,6 +107,8 @@ public function getType()
* Adds a sub-innerHit.
*
* @param NestedInnerHit $innerHit
*
* @return $this
*/
public function addInnerHit(NestedInnerHit $innerHit)
{
Expand All @@ -107,6 +117,8 @@ public function addInnerHit(NestedInnerHit $innerHit)
}

$this->innerHits->add($innerHit);

return $this;
}

/**
Expand Down

0 comments on commit 2c549d2

Please sign in to comment.