Skip to content
Snippets Groups Projects
Commit 92123ed0 authored by Simonas Šerlinskas's avatar Simonas Šerlinskas
Browse files

fixed code style issues

parent ddd2bae8
No related branches found
No related tags found
No related merge requests found
...@@ -69,8 +69,9 @@ class FilterAggregation extends AbstractAggregation ...@@ -69,8 +69,9 @@ class FilterAggregation extends AbstractAggregation
throw new \LogicException("Filter aggregation `{$this->getName()}` has no filter added"); throw new \LogicException("Filter aggregation `{$this->getName()}` has no filter added");
} }
if ($this->filter instanceof BoolFilter && $this->filter->isRelevant() || if ($this->filter instanceof BoolFilter && $this->filter->isRelevant()
!$this->filter instanceof BoolFilter) { || !$this->filter instanceof BoolFilter
) {
$filterData = [$this->filter->getType() => $this->filter->toArray()]; $filterData = [$this->filter->getType() => $this->filter->toArray()];
} else { } else {
$filterData = $this->filter->toArray(); $filterData = $this->filter->toArray();
......
...@@ -32,7 +32,7 @@ class FuzzyLikeThisQuery implements BuilderInterface ...@@ -32,7 +32,7 @@ class FuzzyLikeThisQuery implements BuilderInterface
private $likeText; private $likeText;
/** /**
* @param string|string[] $fields Multiple fields can be set via comma or just an array. * @param string|string[] $fields Multiple fields can be set via comma or just an array.
* @param string $likeText * @param string $likeText
* @param array $parameters * @param array $parameters
*/ */
......
...@@ -141,10 +141,11 @@ class Search ...@@ -141,10 +141,11 @@ class Search
/** /**
* Sets parameters to the endpoint. * Sets parameters to the endpoint.
* *
* @param string $endpointName * @param string $endpointName
* @param array $parameters * @param array $parameters
*/ */
private function setEndpointParameters($endpointName, array $parameters) { private function setEndpointParameters($endpointName, array $parameters)
{
/** @var AbstractSearchEndpoint $endpoint */ /** @var AbstractSearchEndpoint $endpoint */
$endpoint = $this->getEndpoint($endpointName); $endpoint = $this->getEndpoint($endpointName);
$endpoint->setParameters($parameters); $endpoint->setParameters($parameters);
......
...@@ -82,7 +82,7 @@ class FilterAggregationTest extends \PHPUnit_Framework_TestCase ...@@ -82,7 +82,7 @@ class FilterAggregationTest extends \PHPUnit_Framework_TestCase
$result = [ $result = [
'filter' => [ 'filter' => [
$boolFilter->getType() => $boolFilter->toArray(), $boolFilter->getType() => $boolFilter->toArray(),
] ],
]; ];
......
...@@ -18,7 +18,7 @@ use ONGR\ElasticsearchDSL\Query\TermQuery; ...@@ -18,7 +18,7 @@ use ONGR\ElasticsearchDSL\Query\TermQuery;
/** /**
* Unit test for Bool. * Unit test for Bool.
*/ */
class BoolFilterTest extends \PHPUnit_Framework_TestCase class BoolQueryTest extends \PHPUnit_Framework_TestCase
{ {
/** /**
* Tests isRelevant method. * Tests isRelevant method.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment