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

Merge pull request #43 from mvar/cs_fix

Coding style fix
parents 14a52012 b1009dd7
No related branches found
No related tags found
No related merge requests found
......@@ -307,7 +307,7 @@ class Search
*
* @param AbstractAggregation $aggregation
*
* @return $this;
* @return $this
*/
public function addAggregation(AbstractAggregation $aggregation)
{
......
......@@ -20,7 +20,7 @@ use ONGR\ElasticsearchDSL\Query\Span\SpanQueryInterface;
class SpanFirstQueryTest extends \PHPUnit_Framework_TestCase
{
/**
* @var Object.
* @var SpanQueryInterface|\PHPUnit_Framework_MockObject_MockObject
*/
protected $mock;
......@@ -51,9 +51,7 @@ class SpanFirstQueryTest extends \PHPUnit_Framework_TestCase
*/
public function testSpanFirstQueryToArray()
{
/** @var SpanQueryInterface $mock */
$mock = $this->mock;
$query = new SpanFirstQuery($mock, 5);
$query = new SpanFirstQuery($this->mock, 5);
$result = [
'match' => [
'span_or' => [ 'key' => 'value'],
......@@ -68,9 +66,7 @@ class SpanFirstQueryTest extends \PHPUnit_Framework_TestCase
*/
public function testSpanFirstQueryGetType()
{
/** @var SpanQueryInterface $mock */
$mock = $this->mock;
$query = new SpanFirstQuery($mock, 5);
$query = new SpanFirstQuery($this->mock, 5);
$result = $query->getType();
$this->assertEquals('span_first', $result);
}
......
......@@ -20,7 +20,7 @@ use ONGR\ElasticsearchDSL\Query\Span\SpanMultiTermQuery;
class SpanMultiTermQueryTest extends \PHPUnit_Framework_TestCase
{
/**
* @var array.
* @var array
*/
protected $mock;
......
......@@ -20,7 +20,7 @@ use ONGR\ElasticsearchDSL\Query\Span\SpanQueryInterface;
class SpanNearQueryTest extends \PHPUnit_Framework_TestCase
{
/**
* @var Object.
* @var SpanQueryInterface|\PHPUnit_Framework_MockObject_MockObject
*/
protected $mock;
......@@ -51,11 +51,9 @@ class SpanNearQueryTest extends \PHPUnit_Framework_TestCase
*/
public function testSpanMultiTermQueryToArray()
{
/** @var SpanQueryInterface $mock */
$mock = $this->mock;
$query = new SpanNearQuery(['name']);
$query->setSlop(5);
$query->addQuery($mock);
$query->addQuery($this->mock);
$result = [
'clauses' => [
0 => [
......
......@@ -20,7 +20,7 @@ use ONGR\ElasticsearchDSL\Query\Span\SpanQueryInterface;
class SpanNotQueryTest extends \PHPUnit_Framework_TestCase
{
/**
* @var Object.
* @var SpanQueryInterface|\PHPUnit_Framework_MockObject_MockObject
*/
protected $mock;
......@@ -51,9 +51,7 @@ class SpanNotQueryTest extends \PHPUnit_Framework_TestCase
*/
public function testSpanNotQueryGetType()
{
/** @var SpanQueryInterface $mock */
$mock = $this->mock;
$query = new SpanNotQuery($mock, $mock);
$query = new SpanNotQuery($this->mock, $this->mock);
$result = $query->getType();
$this->assertEquals('span_not', $result);
}
......@@ -63,9 +61,7 @@ class SpanNotQueryTest extends \PHPUnit_Framework_TestCase
*/
public function testSpanNotQueryToArray()
{
/** @var SpanQueryInterface $mock */
$mock = $this->mock;
$query = new SpanNotQuery($mock, $mock);
$query = new SpanNotQuery($this->mock, $this->mock);
$result = [
'include' => [
'span_or' => ['key' => 'value'],
......
......@@ -20,7 +20,7 @@ use ONGR\ElasticsearchDSL\Query\Span\SpanQueryInterface;
class SpanOrQueryTest extends \PHPUnit_Framework_TestCase
{
/**
* @var Object.
* @var SpanQueryInterface|\PHPUnit_Framework_MockObject_MockObject
*/
protected $mock;
......@@ -61,10 +61,8 @@ class SpanOrQueryTest extends \PHPUnit_Framework_TestCase
*/
public function testSpanOrQueryToArray()
{
/** @var SpanQueryInterface $mock */
$mock = $this->mock;
$query = new SpanOrQuery();
$query->addQuery($mock);
$query->addQuery($this->mock);
$result = [
'clauses' => [
0 => [
......
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