Total Complexity | 4 |
Total Lines | 39 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
18 | class ConstantScore implements Query |
||
19 | { |
||
20 | use Traits\Boost; |
||
21 | |||
22 | /** |
||
23 | * @var Query |
||
24 | */ |
||
25 | private $query; |
||
26 | |||
27 | /** |
||
28 | * @param Query $query |
||
29 | */ |
||
30 | 3 | public function __construct(Query $query) |
|
31 | { |
||
32 | 3 | $this->query = $query; |
|
33 | 3 | } |
|
34 | |||
35 | /** |
||
36 | * {@inheritdoc} |
||
37 | */ |
||
38 | 1 | public function name(): string |
|
39 | { |
||
40 | 1 | return 'constant_score'; |
|
41 | } |
||
42 | |||
43 | /** |
||
44 | * {@inheritdoc} |
||
45 | */ |
||
46 | 2 | public function compile(): array |
|
57 | } |
||
58 | } |
||
59 |