1 | <?php declare(strict_types=1); |
||
10 | class RelatedResult implements JsonSerializable |
||
11 | { |
||
12 | /** |
||
13 | * @var string |
||
14 | */ |
||
15 | private $term; |
||
16 | |||
17 | /** |
||
18 | * @var bool |
||
19 | */ |
||
20 | private $hasData; |
||
21 | |||
22 | /** |
||
23 | * @var int |
||
24 | */ |
||
25 | private $value; |
||
26 | |||
27 | /** |
||
28 | * @var string |
||
29 | */ |
||
30 | private $searchUrl; |
||
31 | |||
32 | /** |
||
33 | * @var string |
||
34 | */ |
||
35 | private $metricType; |
||
36 | |||
37 | 6 | public function __construct(string $term, bool $hasData, int $value, string $searchUrl, string $metricType = null) |
|
45 | |||
46 | 1 | public function getTerm(): string |
|
50 | |||
51 | 1 | public function hasData(): bool |
|
55 | |||
56 | /** |
||
57 | * @return int |
||
58 | * |
||
59 | * @deprecated Use $this::getValue() |
||
60 | * @codeCoverageIgnore |
||
61 | */ |
||
62 | public function getRanking(): int |
||
66 | |||
67 | 1 | public function getValue(): int |
|
71 | |||
72 | 1 | public function getSearchUrl(): string |
|
76 | |||
77 | 1 | public function getMetricType(): string |
|
81 | |||
82 | 1 | public function jsonSerialize(): array |
|
93 | } |
||
94 |