Skip to content

Commit

Permalink
Apply linting
Browse files Browse the repository at this point in the history
  • Loading branch information
ruflin committed Jul 25, 2017
1 parent eee063c commit 82e53a5
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 19 deletions.
2 changes: 1 addition & 1 deletion lib/Elastica/Query/SpanFirst.php
Expand Up @@ -16,7 +16,7 @@ class SpanFirst extends AbstractSpanQuery
* Constructs a SpanFirst query object.
*
* @param \Elastica\Query\AbstractQuery|array $match OPTIONAL
* @param int $end OPTIONAL
* @param int $end OPTIONAL
*/
public function __construct($match = null, $end = null)
{
Expand Down
6 changes: 3 additions & 3 deletions lib/Elastica/Query/SpanNear.php
Expand Up @@ -16,8 +16,8 @@ class SpanNear extends AbstractSpanQuery
* Constructs a SpanNear query object.
*
* @param AbstractSpanQuery[] $clauses OPTIONAL
* @param int $slop OPTIONAL maximum proximity
* @param bool $inOrder OPTIONAL true if order of searched clauses is important
* @param int $slop OPTIONAL maximum proximity
* @param bool $inOrder OPTIONAL true if order of searched clauses is important
*/
public function __construct($clauses = [], $slop = 1, $inOrder = false)
{
Expand Down Expand Up @@ -68,4 +68,4 @@ public function addClause($clause)

return $this->addParam('clauses', $clause);
}
}
}
2 changes: 1 addition & 1 deletion lib/Elastica/Query/SpanOr.php
Expand Up @@ -48,4 +48,4 @@ public function addClause($clause)

return $this->addParam('clauses', $clause);
}
}
}
6 changes: 3 additions & 3 deletions lib/Elastica/QueryBuilder/DSL/Query.php
Expand Up @@ -357,7 +357,7 @@ public function regexp($key = '', $value = null, $boost = 1.0)
* span first query.
*
* @param \Elastica\Query\AbstractQuery|array $match
* @param int $end
* @param int $end
*
* @return SpanFirst
*
Expand Down Expand Up @@ -386,8 +386,8 @@ public function span_multi_term($match = null)
* span near query.
*
* @param array $clauses
* @param int $slop
* @param bool $inOrder
* @param int $slop
* @param bool $inOrder
*
* @return SpanNear
*
Expand Down
2 changes: 1 addition & 1 deletion lib/Elastica/Search.php
Expand Up @@ -449,7 +449,7 @@ public function search($query = '', $options = null)

// Send scroll_id via raw HTTP body to handle cases of very large (> 4kb) ids.
if ('_search/scroll' == $path) {
$data = [ self::OPTION_SCROLL_ID => $params[self::OPTION_SCROLL_ID] ];
$data = [self::OPTION_SCROLL_ID => $params[self::OPTION_SCROLL_ID]];
unset($params[self::OPTION_SCROLL_ID]);
} else {
$data = $query->toArray();
Expand Down
9 changes: 4 additions & 5 deletions test/Elastica/Query/SpanMultiTest.php
Expand Up @@ -6,7 +6,6 @@
use Elastica\Query\Prefix;
use Elastica\Query\Regexp;
use Elastica\Query\SpanMulti;
use Elastica\Query\Term;
use Elastica\Query\Wildcard;
use Elastica\Test\Base as BaseTest;

Expand All @@ -30,7 +29,7 @@ public function testConstructValid()
'boost' => 0.7,
],
],
]
],
],
];

Expand All @@ -43,10 +42,10 @@ public function testConstructValid()
'match' => [
'fuzzy' => [
$field => [
'value' => $value
'value' => $value,
],
],
]
],
],
];

Expand Down Expand Up @@ -77,7 +76,7 @@ public function testSpanMulti()
]);
$index->refresh();

$spanMultiQuery= new SpanMulti();
$spanMultiQuery = new SpanMulti();

//multi with prefix will match 3
$prefixQuery = new Prefix([$field => ['value' => 'conse']]);
Expand Down
1 change: 0 additions & 1 deletion test/Elastica/Query/SpanOrTest.php
Expand Up @@ -88,6 +88,5 @@ public function testSpanOrTerm()
$spanOrQuery = new SpanOr([$spanTermQuery1, $spanTermQuery2]);
$resultSet = $type->search($spanOrQuery);
$this->assertEquals(1, $resultSet->count());

}
}
2 changes: 1 addition & 1 deletion test/Elastica/Query/SpanTermTest.php
Expand Up @@ -36,7 +36,7 @@ public function testSpanTerm()
$index = $this->_createIndex();
$type = $index->getType('test');

$docMisData = [$field => 'mismatch', 'email' => 'test2@test.com'];
$docMisData = [$field => 'mismatch', 'email' => 'test2@test.com'];
$docHitData = [$field => $value, 'email' => 'test@test.com'];

$doc1 = new Document(1, $docMisData);
Expand Down
1 change: 0 additions & 1 deletion test/Elastica/QueryBuilder/DSL/QueryTest.php
Expand Up @@ -77,6 +77,5 @@ public function testInterface()

$this->_assertNotImplemented($queryDSL, 'geo_shape', []);
$this->_assertNotImplemented($queryDSL, 'span_not', []);

}
}
4 changes: 2 additions & 2 deletions test/Elastica/SearchTest.php
Expand Up @@ -283,7 +283,7 @@ public function testSearchScrollRequest()
$this->assertFalse($result->getResponse()->hasError());
$this->assertEquals(5, count($result->getResults()));
$this->assertArrayNotHasKey(Search::OPTION_SCROLL_ID, $search->getClient()->getLastRequest()->getQuery());
$this->assertEquals( [ Search::OPTION_SCROLL_ID => $scrollId ], $search->getClient()->getLastRequest()->getData());
$this->assertEquals([Search::OPTION_SCROLL_ID => $scrollId], $search->getClient()->getLastRequest()->getData());

$result = $search->search([], [
Search::OPTION_SCROLL => '5m',
Expand All @@ -292,7 +292,7 @@ public function testSearchScrollRequest()
$this->assertFalse($result->getResponse()->hasError());
$this->assertEquals(0, count($result->getResults()));
$this->assertArrayNotHasKey(Search::OPTION_SCROLL_ID, $search->getClient()->getLastRequest()->getQuery());
$this->assertEquals( [ Search::OPTION_SCROLL_ID => $scrollId ], $search->getClient()->getLastRequest()->getData());
$this->assertEquals([Search::OPTION_SCROLL_ID => $scrollId], $search->getClient()->getLastRequest()->getData());
}

/**
Expand Down

0 comments on commit 82e53a5

Please sign in to comment.