1 | <?php |
||
17 | abstract class Query |
||
18 | { |
||
19 | public const REQUEST_METHOD_POST = 'POST'; |
||
20 | public const REQUEST_METHOD_GET = 'GET'; |
||
21 | |||
22 | /** |
||
23 | * @var string |
||
24 | */ |
||
25 | protected static $uri; |
||
26 | |||
27 | /** |
||
28 | * @var string |
||
29 | */ |
||
30 | protected $model; |
||
31 | |||
32 | /** |
||
33 | * @var string |
||
34 | */ |
||
35 | protected $endpoint = 'https://{secure}distribution-xml.booking.com/2.4/json'; |
||
36 | |||
37 | /** |
||
38 | * QueryAbstract constructor. |
||
39 | * @throws ModelException |
||
40 | */ |
||
41 | public function __construct() |
||
45 | |||
46 | /** |
||
47 | * @return Model |
||
48 | * @throws ModelException |
||
49 | */ |
||
50 | public function makeModel(): Model |
||
61 | |||
62 | /** |
||
63 | * @return string |
||
64 | */ |
||
65 | abstract protected function model(): string; |
||
66 | |||
67 | /** |
||
68 | * Returns a list of the bookings that have been made through your account or with one of your affiliate IDs. |
||
69 | * |
||
70 | * @param HttpClientInterface $client |
||
71 | * @return Result |
||
72 | * @throws BookingResponseException |
||
73 | */ |
||
74 | public function execute(HttpClientInterface $client): Result |
||
91 | |||
92 | /** |
||
93 | * Prepare data for request. |
||
94 | * |
||
95 | * @return array |
||
96 | */ |
||
97 | protected function prepareRequestData(): array |
||
110 | |||
111 | /** |
||
112 | * @return array |
||
113 | */ |
||
114 | abstract protected function getAttributeMap(): array; |
||
115 | |||
116 | /** |
||
117 | * @return string |
||
118 | */ |
||
119 | public function getUri(): ?string |
||
123 | |||
124 | /** |
||
125 | * @return string |
||
126 | */ |
||
127 | protected function getRequestMethod(): string |
||
131 | |||
132 | /** |
||
133 | * @param $url |
||
134 | * @return string |
||
135 | */ |
||
136 | protected function getUrl($url): string |
||
140 | |||
141 | /** |
||
142 | * @return bool |
||
143 | */ |
||
144 | abstract protected function isSecure(): bool; |
||
145 | |||
146 | /** |
||
147 | * @param $data |
||
148 | * @return Result |
||
149 | */ |
||
150 | protected function prepareResponse($data): Result |
||
166 | |||
167 | /** |
||
168 | * @param array $data |
||
169 | */ |
||
170 | public function setAttributes(array $data): void |
||
182 | } |
||
183 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..