Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 4 |
|
0.00% |
0 / 4 |
CRAP | |
0.00% |
0 / 1 |
EmptySearchResultSet | |
0.00% |
0 / 4 |
|
0.00% |
0 / 4 |
20 | |
0.00% |
0 / 1 |
__construct | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
transformOneResult | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getElasticaResultSet | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
searchContainedSyntax | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | |
3 | namespace CirrusSearch\Search; |
4 | |
5 | use LogicException; |
6 | |
7 | class EmptySearchResultSet extends BaseCirrusSearchResultSet { |
8 | /** @var bool */ |
9 | private $searchContainedSyntax; |
10 | |
11 | /** |
12 | * @param bool $searchContainedSyntax |
13 | */ |
14 | public function __construct( $searchContainedSyntax ) { |
15 | $this->searchContainedSyntax = $searchContainedSyntax; |
16 | } |
17 | |
18 | /** |
19 | * @inheritDoc |
20 | */ |
21 | protected function transformOneResult( \Elastica\Result $result ) { |
22 | // @phan-suppress-previous-line PhanPluginNeverReturnMethod |
23 | throw new LogicException( "An empty ResultSet has nothing to transform" ); |
24 | } |
25 | |
26 | /** |
27 | * @inheritDoc |
28 | */ |
29 | public function getElasticaResultSet() { |
30 | return null; |
31 | } |
32 | |
33 | /** |
34 | * @inheritDoc |
35 | */ |
36 | public function searchContainedSyntax() { |
37 | return $this->searchContainedSyntax; |
38 | } |
39 | } |