Total Complexity | 5 |
Total Lines | 33 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
13 | class Query extends AbstractPart |
||
14 | { |
||
15 | /** @var string|null The original query string. */ |
||
16 | private ?string $query = null; |
||
17 | |||
18 | public function __construct(?string $query = null) |
||
21 | } |
||
22 | |||
23 | public function getQuery(): string |
||
24 | { |
||
25 | $this->initialize(); |
||
26 | |||
27 | return http_build_query($this->data); |
||
28 | } |
||
29 | |||
30 | public function setQuery(string $query): void |
||
31 | { |
||
32 | $this->initialized = false; |
||
33 | $this->query = $query; |
||
34 | } |
||
35 | |||
36 | public function __toString(): string |
||
37 | { |
||
38 | return $this->getQuery(); |
||
39 | } |
||
40 | |||
41 | protected function doInitialize(): void |
||
46 | } |
||
47 | } |
||
48 |