| Total Complexity | 8 |
| Total Lines | 82 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | class Boosting implements Query |
||
| 18 | { |
||
| 19 | /** |
||
| 20 | * @var Query |
||
| 21 | */ |
||
| 22 | private $positiveQuery; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @var float |
||
| 26 | */ |
||
| 27 | private $positiveBoost; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @var Query |
||
| 31 | */ |
||
| 32 | private $negativeQuery; |
||
| 33 | |||
| 34 | /** |
||
| 35 | * @var float |
||
| 36 | */ |
||
| 37 | private $negativeBoost; |
||
| 38 | |||
| 39 | /** |
||
| 40 | * @param Query $positive |
||
| 41 | * @param float|null $boost |
||
| 42 | * |
||
| 43 | * @return Boosting |
||
| 44 | */ |
||
| 45 | 1 | public function positive(Query $positive, float $boost = null): self |
|
| 51 | } |
||
| 52 | |||
| 53 | /** |
||
| 54 | * @param Query $negative |
||
| 55 | * @param float|null $boost |
||
| 56 | * |
||
| 57 | * @return Boosting |
||
| 58 | */ |
||
| 59 | 1 | public function negative(Query $negative, float $boost = null): self |
|
| 65 | } |
||
| 66 | |||
| 67 | /** |
||
| 68 | * {@inheritdoc} |
||
| 69 | */ |
||
| 70 | 1 | public function name(): string |
|
| 73 | } |
||
| 74 | |||
| 75 | /** |
||
| 76 | * @return array |
||
| 77 | */ |
||
| 78 | 2 | public function compile(): array |
|
| 101 |