Skip to content

Commit d751351

Browse files
committed
Merge pull request #43 from mvar/cs_fix
Coding style fix
2 parents 14a5201 + b1009dd commit d751351

6 files changed

+12
-24
lines changed

src/Search.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ public function setPostFilterParameters(array $parameters)
307307
*
308308
* @param AbstractAggregation $aggregation
309309
*
310-
* @return $this;
310+
* @return $this
311311
*/
312312
public function addAggregation(AbstractAggregation $aggregation)
313313
{

tests/Query/Span/SpanFirstQueryTest.php

+3-7
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
class SpanFirstQueryTest extends \PHPUnit_Framework_TestCase
2121
{
2222
/**
23-
* @var Object.
23+
* @var SpanQueryInterface|\PHPUnit_Framework_MockObject_MockObject
2424
*/
2525
protected $mock;
2626

@@ -51,9 +51,7 @@ public function tearDown()
5151
*/
5252
public function testSpanFirstQueryToArray()
5353
{
54-
/** @var SpanQueryInterface $mock */
55-
$mock = $this->mock;
56-
$query = new SpanFirstQuery($mock, 5);
54+
$query = new SpanFirstQuery($this->mock, 5);
5755
$result = [
5856
'match' => [
5957
'span_or' => [ 'key' => 'value'],
@@ -68,9 +66,7 @@ public function testSpanFirstQueryToArray()
6866
*/
6967
public function testSpanFirstQueryGetType()
7068
{
71-
/** @var SpanQueryInterface $mock */
72-
$mock = $this->mock;
73-
$query = new SpanFirstQuery($mock, 5);
69+
$query = new SpanFirstQuery($this->mock, 5);
7470
$result = $query->getType();
7571
$this->assertEquals('span_first', $result);
7672
}

tests/Query/Span/SpanMultiTermQueryTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
class SpanMultiTermQueryTest extends \PHPUnit_Framework_TestCase
2121
{
2222
/**
23-
* @var array.
23+
* @var array
2424
*/
2525
protected $mock;
2626

tests/Query/Span/SpanNearQueryTest.php

+2-4
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
class SpanNearQueryTest extends \PHPUnit_Framework_TestCase
2121
{
2222
/**
23-
* @var Object.
23+
* @var SpanQueryInterface|\PHPUnit_Framework_MockObject_MockObject
2424
*/
2525
protected $mock;
2626

@@ -51,11 +51,9 @@ public function tearDown()
5151
*/
5252
public function testSpanMultiTermQueryToArray()
5353
{
54-
/** @var SpanQueryInterface $mock */
55-
$mock = $this->mock;
5654
$query = new SpanNearQuery(['name']);
5755
$query->setSlop(5);
58-
$query->addQuery($mock);
56+
$query->addQuery($this->mock);
5957
$result = [
6058
'clauses' => [
6159
0 => [

tests/Query/Span/SpanNotQueryTest.php

+3-7
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
class SpanNotQueryTest extends \PHPUnit_Framework_TestCase
2121
{
2222
/**
23-
* @var Object.
23+
* @var SpanQueryInterface|\PHPUnit_Framework_MockObject_MockObject
2424
*/
2525
protected $mock;
2626

@@ -51,9 +51,7 @@ public function tearDown()
5151
*/
5252
public function testSpanNotQueryGetType()
5353
{
54-
/** @var SpanQueryInterface $mock */
55-
$mock = $this->mock;
56-
$query = new SpanNotQuery($mock, $mock);
54+
$query = new SpanNotQuery($this->mock, $this->mock);
5755
$result = $query->getType();
5856
$this->assertEquals('span_not', $result);
5957
}
@@ -63,9 +61,7 @@ public function testSpanNotQueryGetType()
6361
*/
6462
public function testSpanNotQueryToArray()
6563
{
66-
/** @var SpanQueryInterface $mock */
67-
$mock = $this->mock;
68-
$query = new SpanNotQuery($mock, $mock);
64+
$query = new SpanNotQuery($this->mock, $this->mock);
6965
$result = [
7066
'include' => [
7167
'span_or' => ['key' => 'value'],

tests/Query/Span/SpanOrQueryTest.php

+2-4
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
class SpanOrQueryTest extends \PHPUnit_Framework_TestCase
2121
{
2222
/**
23-
* @var Object.
23+
* @var SpanQueryInterface|\PHPUnit_Framework_MockObject_MockObject
2424
*/
2525
protected $mock;
2626

@@ -61,10 +61,8 @@ public function testSpanOrQueryGetType()
6161
*/
6262
public function testSpanOrQueryToArray()
6363
{
64-
/** @var SpanQueryInterface $mock */
65-
$mock = $this->mock;
6664
$query = new SpanOrQuery();
67-
$query->addQuery($mock);
65+
$query->addQuery($this->mock);
6866
$result = [
6967
'clauses' => [
7068
0 => [

0 commit comments

Comments
 (0)