Total Complexity | 6 |
Total Lines | 41 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | class BoostingQuery extends QueryAbstract |
||
13 | { |
||
14 | const NAME = 'boosting'; |
||
15 | |||
16 | /** |
||
17 | * @var QueryCollection |
||
18 | */ |
||
19 | private $positive; |
||
20 | |||
21 | protected function get_positive(): QueryCollection |
||
22 | { |
||
23 | return $this->positive ?: $this->positive = new QueryCollection; |
||
|
|||
24 | } |
||
25 | |||
26 | /** |
||
27 | * @var QueryCollection |
||
28 | */ |
||
29 | private $negative; |
||
30 | |||
31 | protected function get_negative(): QueryCollection |
||
34 | } |
||
35 | |||
36 | /** |
||
37 | * @var float |
||
38 | */ |
||
39 | private $negative_boost; |
||
40 | |||
41 | public function __construct(float $negative_boost = 0.5) |
||
44 | } |
||
45 | |||
46 | public function jsonSerialize() |
||
57 |