Test Failed
Pull Request — master (#5)
by
unknown
07:15
created
src/Api/Geocoding.php 1 patch
Indentation   +41 added lines, -41 removed lines patch added patch discarded remove patch
@@ -25,53 +25,53 @@
 block discarded – undo
25 25
 class Geocoding extends Api
26 26
 {
27 27
 
28
-	/**
29
-	 * @var string
30
-	 */
31
-	const SERVICE_ENDPOINT = 'geocode';
28
+    /**
29
+     * @var string
30
+     */
31
+    const SERVICE_ENDPOINT = 'geocode';
32 32
 
33
-	/**
34
-	 * @var string
35
-	 */
36
-	protected $result_collection_type = GeocodingResultsCollection::class;
33
+    /**
34
+     * @var string
35
+     */
36
+    protected $result_collection_type = GeocodingResultsCollection::class;
37 37
 
38
-	/**
39
-	 * @param string $literal_address
40
-	 *
41
-	 * @return GoogleMapsResultsCollection
42
-	 */
43
-	public function getByAddress(string $literal_address): GoogleMapsResultsCollection
44
-	{
38
+    /**
39
+     * @param string $literal_address
40
+     *
41
+     * @return GoogleMapsResultsCollection
42
+     */
43
+    public function getByAddress(string $literal_address): GoogleMapsResultsCollection
44
+    {
45 45
 
46
-		return $this->callApi([
47
-			GoogleMapsRequestFields::ADDRESS => $literal_address
48
-		]);
49
-	}
46
+        return $this->callApi([
47
+            GoogleMapsRequestFields::ADDRESS => $literal_address
48
+        ]);
49
+    }
50 50
 
51
-	/**
52
-	 * @param LatLng $latlng
53
-	 *
54
-	 * @return GoogleMapsResultsCollection
55
-	 */
56
-	public function getReverse(LatLng $latlng): GoogleMapsResultsCollection
57
-	{
51
+    /**
52
+     * @param LatLng $latlng
53
+     *
54
+     * @return GoogleMapsResultsCollection
55
+     */
56
+    public function getReverse(LatLng $latlng): GoogleMapsResultsCollection
57
+    {
58 58
 
59
-		return $this->callApi([
60
-			GoogleMapsRequestFields::LATLNG => $latlng
61
-		]);
62
-	}
59
+        return $this->callApi([
60
+            GoogleMapsRequestFields::LATLNG => $latlng
61
+        ]);
62
+    }
63 63
 
64
-	/**
65
-	 * @param string $place_id
66
-	 *
67
-	 * @return GoogleMapsResultsCollection
68
-	 */
69
-	public function getByPlaceId(string $place_id): GoogleMapsResultsCollection
70
-	{
64
+    /**
65
+     * @param string $place_id
66
+     *
67
+     * @return GoogleMapsResultsCollection
68
+     */
69
+    public function getByPlaceId(string $place_id): GoogleMapsResultsCollection
70
+    {
71 71
 
72
-		return $this->callApi([
73
-			GoogleMapsRequestFields::PLACE_ID => $place_id
74
-		]);
75
-	}
72
+        return $this->callApi([
73
+            GoogleMapsRequestFields::PLACE_ID => $place_id
74
+        ]);
75
+    }
76 76
 
77 77
 }
78 78
\ No newline at end of file
Please login to merge, or discard this patch.
src/Http/GoogleMapsResponse.php 1 patch
Indentation   +336 added lines, -336 removed lines patch added patch discarded remove patch
@@ -23,341 +23,341 @@
 block discarded – undo
23 23
 class GoogleMapsResponse
24 24
 {
25 25
 
26
-	/**
27
-	 * @var Response
28
-	 */
29
-	protected $response = null;
30
-
31
-	/**
32
-	 * Single result
33
-	 * When the Places service returns results from a details request, it places them within a single result
34
-	 *
35
-	 * @var array
36
-	 * @see https://developers.google.com/places/web-service/details#PlaceDetailsResults
37
-	 */
38
-	protected $result = null;
39
-
40
-	/**
41
-	 * contains an array of places, with information about each.
42
-	 * The Places API returns up to 20 establishment results per query.
43
-	 * Additionally, political results may be returned which serve to identify the area of the request.
44
-	 *
45
-	 * @var array
46
-	 * @see https://developers.google.com/places/web-service/search#PlaceSearchResults
47
-	 */
48
-	protected $results = null;
49
-
50
-	/**
51
-	 * contains metadata on the request.
52
-	 *
53
-	 * @var string
54
-	 * @see https://developers.google.com/places/web-service/search#PlaceSearchStatusCodes
55
-	 */
56
-	protected $status = null;
57
-
58
-	/**
59
-	 * @var string
60
-	 */
61
-	protected $error_message = null;
62
-
63
-	/**
64
-	 * @var array
65
-	 */
66
-	protected $array_response = null;
67
-
68
-	/**
69
-	 * @var null|array
70
-	 */
71
-	protected $http_status_code = null;
72
-
73
-	/**
74
-	 * may contain a set of attributions about this listing which must be displayed to the user (some listings may not have attribution).
75
-	 *
76
-	 * @var null|array
77
-	 * @since 0.5.0
78
-	 */
79
-	protected $html_attributions = null;
80
-
81
-	/**
82
-	 * @var null|string
83
-	 * @since 0.5.0
84
-	 */
85
-	protected $next_page_token = null;
86
-
87
-	/**
88
-	 * GoogleMapsResponse constructor.
89
-	 *
90
-	 * @param Response $response
91
-	 */
92
-	public function __construct(Response $response)
93
-	{
94
-
95
-		$this->setResponse($response);
96
-
97
-		$this->parseResponse();
98
-
99
-		$this->checkHttpStatusCode();
100
-	}
101
-
102
-	/**
103
-	 * @param Response $response
104
-	 *
105
-	 * @return GoogleMapsResponse
106
-	 */
107
-	public function setResponse(Response $response): GoogleMapsResponse
108
-	{
109
-
110
-		$this->response = $response;
111
-
112
-		return $this;
113
-	}
114
-
115
-	/**
116
-	 * @return GoogleMapsResponse
117
-	 *
118
-	 * @throws RequestException
119
-	 * @throws ResponseException
120
-	 */
121
-	protected function parseResponse(): GoogleMapsResponse
122
-	{
123
-
124
-		$json_response = $this->response->getBody()->getContents();
125
-		$array_response = $this->toArray($json_response);
126
-		$result = null;
127
-		$results = null;
128
-
129
-		if (empty($array_response[GoogleMapsResponseFields::STATUS])) {
130
-			throw new ResponseException('Missing "status" in GoogleMapsApi Response');
131
-		}
132
-		$this->setStatus($array_response[GoogleMapsResponseFields::STATUS]);
133
-
134
-		if ($this->getStatus() != GoogleMapsResponseStatusValues::OK) {
135
-			$error_message = 'Something went wrong';
136
-			if (!empty($array_response[GoogleMapsResponseFields::ERROR_MESSAGE])) {
137
-				$error_message = $array_response[GoogleMapsResponseFields::ERROR_MESSAGE];
138
-				$this->setErrorMessage($error_message);
139
-			} elseif (!empty($array_response[GoogleMapsResponseFields::STATUS])) {
140
-				$error_message .= ': ' . $array_response[GoogleMapsResponseFields::STATUS];
141
-				$this->setErrorMessage($error_message);
142
-			}
143
-			throw new RequestException($error_message);
144
-
145
-		}
146
-
147
-		if (!empty($array_response[GoogleMapsResponseFields::RESULTS])) {
148
-			$results = $array_response[GoogleMapsResponseFields::RESULTS];
149
-
150
-		} elseif (!empty($array_response[GoogleMapsResponseFields::CANDIDATES])) {
151
-			$results = $array_response[GoogleMapsResponseFields::CANDIDATES];
152
-
153
-		}elseif (!empty($array_response[GoogleMapsResponseFields::RESULT])) {
154
-			$result = $array_response[GoogleMapsResponseFields::RESULT];
155
-
156
-		} else {
157
-			throw new ResponseException('Missing "results" in GoogleMapsApi Response');
158
-		}
159
-		$this->setResult($result);
160
-		$this->setResults($results);
161
-
162
-		if (!empty($array_response[GoogleMapsResponseFields::HTML_ATTRIBUTIONS])) {
163
-			$this->setHtmlAttributions($array_response[GoogleMapsResponseFields::HTML_ATTRIBUTIONS]);
164
-		}
165
-
166
-		if (!empty($array_response[GoogleMapsResponseFields::NEXT_PAGE_TOKEN])) {
167
-			$this->setNextPageToken($array_response[GoogleMapsResponseFields::NEXT_PAGE_TOKEN]);
168
-		}
169
-
170
-		return $this;
171
-	}
172
-
173
-	/**
174
-	 * @param string $json_response
175
-	 *
176
-	 * @return array
177
-	 */
178
-	public function toArray(string $json_response): array
179
-	{
180
-
181
-		$this->array_response = json_decode($json_response, true);
182
-
183
-		return $this->array_response;
184
-	}
185
-
186
-	/**
187
-	 * @return string
188
-	 */
189
-	public function getStatus(): string
190
-	{
191
-
192
-		return $this->status;
193
-	}
194
-
195
-	/**
196
-	 * @param string $status
197
-	 *
198
-	 * @return GoogleMapsResponse
199
-	 */
200
-	public function setStatus(string $status)
201
-	{
202
-
203
-		$this->status = $status;
204
-
205
-		return $this;
206
-	}
207
-
208
-	/**
209
-	 * Check HTTP status code (silent/No exceptions!)
210
-	 * @return int
211
-	 */
212
-	protected function checkHttpStatusCode(): int
213
-	{
214
-
215
-		$this->http_status_code = $this->response->getStatusCode();
216
-
217
-		return $this->http_status_code;
218
-	}
219
-
220
-	/**
221
-	 * @return array
222
-	 */
223
-	public function getResults()
224
-	{
225
-
226
-		return $this->results;
227
-	}
228
-
229
-	/**
230
-	 * @param array $results
231
-	 *
232
-	 * @return $this
233
-	 */
234
-	public function setResults(?array $results)
235
-	{
236
-
237
-		$this->results = $results;
238
-
239
-		return $this;
240
-	}
241
-
242
-	/**
243
-	 * @return array
244
-	 * @since v0.6.0
245
-	 */
246
-	public function getResult()
247
-	{
248
-
249
-		return $this->result;
250
-	}
251
-
252
-	/**
253
-	 * @param array $result
254
-	 *
255
-	 * @return $this
256
-	 * @since v0.6.0
257
-	 */
258
-	public function setResult(?array $result)
259
-	{
260
-
261
-		$this->result = $result;
262
-
263
-		return $this;
264
-	}
265
-
266
-	/**
267
-	 * @return array
268
-	 */
269
-	public function getArrayResponse(): array
270
-	{
271
-
272
-		return $this->array_response;
273
-	}
274
-
275
-	/**
276
-	 * @param array $array_response
277
-	 *
278
-	 * @return GoogleMapsResponse
279
-	 */
280
-	public function setArrayResponse(array $array_response): GoogleMapsResponse
281
-	{
282
-
283
-		$this->array_response = $array_response;
284
-
285
-		return $this;
286
-	}
287
-
288
-	/**
289
-	 * @return mixed
290
-	 */
291
-	public function getErrorMessage()
292
-	{
293
-
294
-		return $this->error_message;
295
-	}
296
-
297
-	/**
298
-	 * @param $error_message
299
-	 *
300
-	 * @return GoogleMapsResponse
301
-	 */
302
-	public function setErrorMessage($error_message): GoogleMapsResponse
303
-	{
304
-
305
-		$this->error_message = $error_message;
306
-
307
-		return $this;
308
-	}
309
-
310
-	/**
311
-	 * @return int
312
-	 */
313
-	public function getHttpStatusCode(): int
314
-	{
315
-
316
-		return intval($this->http_status_code);
317
-	}
318
-
319
-	/**
320
-	 * @return array|null
321
-	 */
322
-	public function getHtmlAttributions(): ?array
323
-	{
324
-
325
-		return $this->html_attributions;
326
-	}
327
-
328
-	/**
329
-	 * @param array|null $html_attributions
330
-	 *
331
-	 * @return GoogleMapsResponse
332
-	 */
333
-	public function setHtmlAttributions(?array $html_attributions): GoogleMapsResponse
334
-	{
335
-
336
-		$this->html_attributions = $html_attributions;
337
-
338
-		return $this;
339
-	}
340
-
341
-	/**
342
-	 * @return string
343
-	 */
344
-	public function getNextPageToken(): string
345
-	{
346
-
347
-		return $this->next_page_token ?? '';
348
-	}
349
-
350
-	/**
351
-	 * @param $next_page_token
352
-	 *
353
-	 * @return GoogleMapsResponse
354
-	 */
355
-	public function setNextPageToken($next_page_token): GoogleMapsResponse
356
-	{
357
-
358
-		$this->next_page_token = $next_page_token;
359
-
360
-		return $this;
361
-	}
26
+    /**
27
+     * @var Response
28
+     */
29
+    protected $response = null;
30
+
31
+    /**
32
+     * Single result
33
+     * When the Places service returns results from a details request, it places them within a single result
34
+     *
35
+     * @var array
36
+     * @see https://developers.google.com/places/web-service/details#PlaceDetailsResults
37
+     */
38
+    protected $result = null;
39
+
40
+    /**
41
+     * contains an array of places, with information about each.
42
+     * The Places API returns up to 20 establishment results per query.
43
+     * Additionally, political results may be returned which serve to identify the area of the request.
44
+     *
45
+     * @var array
46
+     * @see https://developers.google.com/places/web-service/search#PlaceSearchResults
47
+     */
48
+    protected $results = null;
49
+
50
+    /**
51
+     * contains metadata on the request.
52
+     *
53
+     * @var string
54
+     * @see https://developers.google.com/places/web-service/search#PlaceSearchStatusCodes
55
+     */
56
+    protected $status = null;
57
+
58
+    /**
59
+     * @var string
60
+     */
61
+    protected $error_message = null;
62
+
63
+    /**
64
+     * @var array
65
+     */
66
+    protected $array_response = null;
67
+
68
+    /**
69
+     * @var null|array
70
+     */
71
+    protected $http_status_code = null;
72
+
73
+    /**
74
+     * may contain a set of attributions about this listing which must be displayed to the user (some listings may not have attribution).
75
+     *
76
+     * @var null|array
77
+     * @since 0.5.0
78
+     */
79
+    protected $html_attributions = null;
80
+
81
+    /**
82
+     * @var null|string
83
+     * @since 0.5.0
84
+     */
85
+    protected $next_page_token = null;
86
+
87
+    /**
88
+     * GoogleMapsResponse constructor.
89
+     *
90
+     * @param Response $response
91
+     */
92
+    public function __construct(Response $response)
93
+    {
94
+
95
+        $this->setResponse($response);
96
+
97
+        $this->parseResponse();
98
+
99
+        $this->checkHttpStatusCode();
100
+    }
101
+
102
+    /**
103
+     * @param Response $response
104
+     *
105
+     * @return GoogleMapsResponse
106
+     */
107
+    public function setResponse(Response $response): GoogleMapsResponse
108
+    {
109
+
110
+        $this->response = $response;
111
+
112
+        return $this;
113
+    }
114
+
115
+    /**
116
+     * @return GoogleMapsResponse
117
+     *
118
+     * @throws RequestException
119
+     * @throws ResponseException
120
+     */
121
+    protected function parseResponse(): GoogleMapsResponse
122
+    {
123
+
124
+        $json_response = $this->response->getBody()->getContents();
125
+        $array_response = $this->toArray($json_response);
126
+        $result = null;
127
+        $results = null;
128
+
129
+        if (empty($array_response[GoogleMapsResponseFields::STATUS])) {
130
+            throw new ResponseException('Missing "status" in GoogleMapsApi Response');
131
+        }
132
+        $this->setStatus($array_response[GoogleMapsResponseFields::STATUS]);
133
+
134
+        if ($this->getStatus() != GoogleMapsResponseStatusValues::OK) {
135
+            $error_message = 'Something went wrong';
136
+            if (!empty($array_response[GoogleMapsResponseFields::ERROR_MESSAGE])) {
137
+                $error_message = $array_response[GoogleMapsResponseFields::ERROR_MESSAGE];
138
+                $this->setErrorMessage($error_message);
139
+            } elseif (!empty($array_response[GoogleMapsResponseFields::STATUS])) {
140
+                $error_message .= ': ' . $array_response[GoogleMapsResponseFields::STATUS];
141
+                $this->setErrorMessage($error_message);
142
+            }
143
+            throw new RequestException($error_message);
144
+
145
+        }
146
+
147
+        if (!empty($array_response[GoogleMapsResponseFields::RESULTS])) {
148
+            $results = $array_response[GoogleMapsResponseFields::RESULTS];
149
+
150
+        } elseif (!empty($array_response[GoogleMapsResponseFields::CANDIDATES])) {
151
+            $results = $array_response[GoogleMapsResponseFields::CANDIDATES];
152
+
153
+        }elseif (!empty($array_response[GoogleMapsResponseFields::RESULT])) {
154
+            $result = $array_response[GoogleMapsResponseFields::RESULT];
155
+
156
+        } else {
157
+            throw new ResponseException('Missing "results" in GoogleMapsApi Response');
158
+        }
159
+        $this->setResult($result);
160
+        $this->setResults($results);
161
+
162
+        if (!empty($array_response[GoogleMapsResponseFields::HTML_ATTRIBUTIONS])) {
163
+            $this->setHtmlAttributions($array_response[GoogleMapsResponseFields::HTML_ATTRIBUTIONS]);
164
+        }
165
+
166
+        if (!empty($array_response[GoogleMapsResponseFields::NEXT_PAGE_TOKEN])) {
167
+            $this->setNextPageToken($array_response[GoogleMapsResponseFields::NEXT_PAGE_TOKEN]);
168
+        }
169
+
170
+        return $this;
171
+    }
172
+
173
+    /**
174
+     * @param string $json_response
175
+     *
176
+     * @return array
177
+     */
178
+    public function toArray(string $json_response): array
179
+    {
180
+
181
+        $this->array_response = json_decode($json_response, true);
182
+
183
+        return $this->array_response;
184
+    }
185
+
186
+    /**
187
+     * @return string
188
+     */
189
+    public function getStatus(): string
190
+    {
191
+
192
+        return $this->status;
193
+    }
194
+
195
+    /**
196
+     * @param string $status
197
+     *
198
+     * @return GoogleMapsResponse
199
+     */
200
+    public function setStatus(string $status)
201
+    {
202
+
203
+        $this->status = $status;
204
+
205
+        return $this;
206
+    }
207
+
208
+    /**
209
+     * Check HTTP status code (silent/No exceptions!)
210
+     * @return int
211
+     */
212
+    protected function checkHttpStatusCode(): int
213
+    {
214
+
215
+        $this->http_status_code = $this->response->getStatusCode();
216
+
217
+        return $this->http_status_code;
218
+    }
219
+
220
+    /**
221
+     * @return array
222
+     */
223
+    public function getResults()
224
+    {
225
+
226
+        return $this->results;
227
+    }
228
+
229
+    /**
230
+     * @param array $results
231
+     *
232
+     * @return $this
233
+     */
234
+    public function setResults(?array $results)
235
+    {
236
+
237
+        $this->results = $results;
238
+
239
+        return $this;
240
+    }
241
+
242
+    /**
243
+     * @return array
244
+     * @since v0.6.0
245
+     */
246
+    public function getResult()
247
+    {
248
+
249
+        return $this->result;
250
+    }
251
+
252
+    /**
253
+     * @param array $result
254
+     *
255
+     * @return $this
256
+     * @since v0.6.0
257
+     */
258
+    public function setResult(?array $result)
259
+    {
260
+
261
+        $this->result = $result;
262
+
263
+        return $this;
264
+    }
265
+
266
+    /**
267
+     * @return array
268
+     */
269
+    public function getArrayResponse(): array
270
+    {
271
+
272
+        return $this->array_response;
273
+    }
274
+
275
+    /**
276
+     * @param array $array_response
277
+     *
278
+     * @return GoogleMapsResponse
279
+     */
280
+    public function setArrayResponse(array $array_response): GoogleMapsResponse
281
+    {
282
+
283
+        $this->array_response = $array_response;
284
+
285
+        return $this;
286
+    }
287
+
288
+    /**
289
+     * @return mixed
290
+     */
291
+    public function getErrorMessage()
292
+    {
293
+
294
+        return $this->error_message;
295
+    }
296
+
297
+    /**
298
+     * @param $error_message
299
+     *
300
+     * @return GoogleMapsResponse
301
+     */
302
+    public function setErrorMessage($error_message): GoogleMapsResponse
303
+    {
304
+
305
+        $this->error_message = $error_message;
306
+
307
+        return $this;
308
+    }
309
+
310
+    /**
311
+     * @return int
312
+     */
313
+    public function getHttpStatusCode(): int
314
+    {
315
+
316
+        return intval($this->http_status_code);
317
+    }
318
+
319
+    /**
320
+     * @return array|null
321
+     */
322
+    public function getHtmlAttributions(): ?array
323
+    {
324
+
325
+        return $this->html_attributions;
326
+    }
327
+
328
+    /**
329
+     * @param array|null $html_attributions
330
+     *
331
+     * @return GoogleMapsResponse
332
+     */
333
+    public function setHtmlAttributions(?array $html_attributions): GoogleMapsResponse
334
+    {
335
+
336
+        $this->html_attributions = $html_attributions;
337
+
338
+        return $this;
339
+    }
340
+
341
+    /**
342
+     * @return string
343
+     */
344
+    public function getNextPageToken(): string
345
+    {
346
+
347
+        return $this->next_page_token ?? '';
348
+    }
349
+
350
+    /**
351
+     * @param $next_page_token
352
+     *
353
+     * @return GoogleMapsResponse
354
+     */
355
+    public function setNextPageToken($next_page_token): GoogleMapsResponse
356
+    {
357
+
358
+        $this->next_page_token = $next_page_token;
359
+
360
+        return $this;
361
+    }
362 362
 
363 363
 }
364 364
\ No newline at end of file
Please login to merge, or discard this patch.
src/Fields/GoogleMapsResponseFields.php 1 patch
Indentation   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -17,43 +17,43 @@
 block discarded – undo
17 17
 class GoogleMapsResponseFields
18 18
 {
19 19
 
20
-	/**
21
-	 * @var string results
22
-	 */
23
-	const RESULTS = 'results';
24
-
25
-	/**
26
-	 * @var string result
27
-	 * @since v0.6.0
28
-	 */
29
-	const RESULT = 'result';
30
-
31
-	/**
32
-	 * @var string status
33
-	 */
34
-	const STATUS = 'status';
35
-
36
-	/**
37
-	 * @var string error_message
38
-	 */
39
-	const ERROR_MESSAGE = 'error_message';
40
-
41
-	/**
42
-	 * @var string candidates
43
-	 * @since 0.5.0
44
-	 */
45
-	const CANDIDATES = 'candidates';
46
-
47
-	/**
48
-	 * @var string html_attributions
49
-	 * @since 0.5.0
50
-	 */
51
-	const HTML_ATTRIBUTIONS = 'html_attributions';
52
-
53
-	/**
54
-	 * @var string next_page_token
55
-	 * @since 0.5.0
56
-	 */
57
-	const NEXT_PAGE_TOKEN = 'next_page_token';
20
+    /**
21
+     * @var string results
22
+     */
23
+    const RESULTS = 'results';
24
+
25
+    /**
26
+     * @var string result
27
+     * @since v0.6.0
28
+     */
29
+    const RESULT = 'result';
30
+
31
+    /**
32
+     * @var string status
33
+     */
34
+    const STATUS = 'status';
35
+
36
+    /**
37
+     * @var string error_message
38
+     */
39
+    const ERROR_MESSAGE = 'error_message';
40
+
41
+    /**
42
+     * @var string candidates
43
+     * @since 0.5.0
44
+     */
45
+    const CANDIDATES = 'candidates';
46
+
47
+    /**
48
+     * @var string html_attributions
49
+     * @since 0.5.0
50
+     */
51
+    const HTML_ATTRIBUTIONS = 'html_attributions';
52
+
53
+    /**
54
+     * @var string next_page_token
55
+     * @since 0.5.0
56
+     */
57
+    const NEXT_PAGE_TOKEN = 'next_page_token';
58 58
 
59 59
 }
60 60
\ No newline at end of file
Please login to merge, or discard this patch.
src/Fields/GoogleMapsRequestFields.php 1 patch
Indentation   +159 added lines, -159 removed lines patch added patch discarded remove patch
@@ -17,163 +17,163 @@
 block discarded – undo
17 17
 class GoogleMapsRequestFields
18 18
 {
19 19
 
20
-	/**
21
-	 * @var string key
22
-	 */
23
-	const KEY = 'key';
24
-
25
-	/**
26
-	 * @var string sensor
27
-	 */
28
-	const SENSOR = 'sensor';
29
-
30
-	/**
31
-	 * @var string latlng
32
-	 */
33
-	const LATLNG = 'latlng';
34
-
35
-	/**
36
-	 * @var string address
37
-	 */
38
-	const ADDRESS = 'address';
39
-
40
-	/**
41
-	 * @var string place_id
42
-	 */
43
-	const PLACE_ID = 'place_id';
44
-
45
-	/**
46
-	 * @var string location
47
-	 * @since 0.5.0
48
-	 */
49
-	const LOCATION = 'location';
50
-
51
-	/**
52
-	 * @var string locations
53
-	 */
54
-	const LOCATIONS = 'locations';
55
-
56
-	/**
57
-	 * @var string path
58
-	 */
59
-	const PATH = 'path';
60
-
61
-	/**
62
-	 * @var string samples
63
-	 */
64
-	const SAMPLES = 'samples';
65
-
66
-	/**
67
-	 * @var string input
68
-	 * @since 0.5.0
69
-	 */
70
-	const INPUT = 'input';
71
-
72
-	/**
73
-	 * @var string inputtype
74
-	 * @since 0.5.0
75
-	 */
76
-	const INPUTTYPE = 'inputtype';
77
-
78
-	/**
79
-	 * @var string language
80
-	 * @since 0.5.0
81
-	 */
82
-	const LANGUAGE = 'language';
83
-
84
-	/**
85
-	 * @var string fields
86
-	 * @since 0.5.0
87
-	 */
88
-	const FIELDS = 'fields';
89
-
90
-	/**
91
-	 * @var string locationbias
92
-	 * @since 0.5.0
93
-	 */
94
-	const LOCATIONBIAS = 'locationbias';
95
-
96
-	/**
97
-	 * @var string radius
98
-	 * @since 0.5.0
99
-	 */
100
-	const RADIUS = 'radius';
101
-
102
-	/**
103
-	 * @var string rankby
104
-	 * @since 0.5.0
105
-	 */
106
-	const RANKBY = 'rankby';
107
-
108
-	/**
109
-	 * @var string keyword
110
-	 * @since 0.5.0
111
-	 */
112
-	const KEYWORD = 'keyword';
113
-
114
-	/**
115
-	 * @var string minprice
116
-	 * @since 0.5.0
117
-	 */
118
-	const MINPRICE = 'minprice';
119
-
120
-	/**
121
-	 * @var string maxprice
122
-	 * @since 0.5.0
123
-	 */
124
-	const MAXPRICE = 'maxprice';
125
-
126
-	/**
127
-	 * @var string name
128
-	 * @since 0.5.0
129
-	 */
130
-	const NAME = 'name';
131
-
132
-	/**
133
-	 * @var string opennow
134
-	 * @since 0.5.0
135
-	 */
136
-	const OPENNOW = 'opennow';
137
-
138
-	/**
139
-	 * @var string pagetoken
140
-	 * @since 0.5.0
141
-	 */
142
-	const PAGETOKEN = 'pagetoken';
143
-
144
-	/**
145
-	 * @var string type
146
-	 * @since 0.5.0
147
-	 */
148
-	const TYPE = 'type';
149
-
150
-	/**
151
-	 * @var string query
152
-	 * @since 0.5.0
153
-	 */
154
-	const QUERY = 'query';
155
-
156
-	/**
157
-	 * @var string next_page_token
158
-	 * @since 0.5.0
159
-	 */
160
-	const NEXT_PAGE_TOKEN = 'next_page_token';
161
-
162
-	/**
163
-	 * @var string photoreference
164
-	 * @since 0.6.0
165
-	 */
166
-	const PHOTOREFERENCE = 'photoreference';
167
-
168
-	/**
169
-	 * @var string maxwidth
170
-	 * @since 0.6.0
171
-	 */
172
-	const MAXWIDTH = 'maxwidth';
173
-
174
-	/**
175
-	 * @var string maxheight
176
-	 * @since 0.6.0
177
-	 */
178
-	const MAXHEIGHT = 'maxheight';
20
+    /**
21
+     * @var string key
22
+     */
23
+    const KEY = 'key';
24
+
25
+    /**
26
+     * @var string sensor
27
+     */
28
+    const SENSOR = 'sensor';
29
+
30
+    /**
31
+     * @var string latlng
32
+     */
33
+    const LATLNG = 'latlng';
34
+
35
+    /**
36
+     * @var string address
37
+     */
38
+    const ADDRESS = 'address';
39
+
40
+    /**
41
+     * @var string place_id
42
+     */
43
+    const PLACE_ID = 'place_id';
44
+
45
+    /**
46
+     * @var string location
47
+     * @since 0.5.0
48
+     */
49
+    const LOCATION = 'location';
50
+
51
+    /**
52
+     * @var string locations
53
+     */
54
+    const LOCATIONS = 'locations';
55
+
56
+    /**
57
+     * @var string path
58
+     */
59
+    const PATH = 'path';
60
+
61
+    /**
62
+     * @var string samples
63
+     */
64
+    const SAMPLES = 'samples';
65
+
66
+    /**
67
+     * @var string input
68
+     * @since 0.5.0
69
+     */
70
+    const INPUT = 'input';
71
+
72
+    /**
73
+     * @var string inputtype
74
+     * @since 0.5.0
75
+     */
76
+    const INPUTTYPE = 'inputtype';
77
+
78
+    /**
79
+     * @var string language
80
+     * @since 0.5.0
81
+     */
82
+    const LANGUAGE = 'language';
83
+
84
+    /**
85
+     * @var string fields
86
+     * @since 0.5.0
87
+     */
88
+    const FIELDS = 'fields';
89
+
90
+    /**
91
+     * @var string locationbias
92
+     * @since 0.5.0
93
+     */
94
+    const LOCATIONBIAS = 'locationbias';
95
+
96
+    /**
97
+     * @var string radius
98
+     * @since 0.5.0
99
+     */
100
+    const RADIUS = 'radius';
101
+
102
+    /**
103
+     * @var string rankby
104
+     * @since 0.5.0
105
+     */
106
+    const RANKBY = 'rankby';
107
+
108
+    /**
109
+     * @var string keyword
110
+     * @since 0.5.0
111
+     */
112
+    const KEYWORD = 'keyword';
113
+
114
+    /**
115
+     * @var string minprice
116
+     * @since 0.5.0
117
+     */
118
+    const MINPRICE = 'minprice';
119
+
120
+    /**
121
+     * @var string maxprice
122
+     * @since 0.5.0
123
+     */
124
+    const MAXPRICE = 'maxprice';
125
+
126
+    /**
127
+     * @var string name
128
+     * @since 0.5.0
129
+     */
130
+    const NAME = 'name';
131
+
132
+    /**
133
+     * @var string opennow
134
+     * @since 0.5.0
135
+     */
136
+    const OPENNOW = 'opennow';
137
+
138
+    /**
139
+     * @var string pagetoken
140
+     * @since 0.5.0
141
+     */
142
+    const PAGETOKEN = 'pagetoken';
143
+
144
+    /**
145
+     * @var string type
146
+     * @since 0.5.0
147
+     */
148
+    const TYPE = 'type';
149
+
150
+    /**
151
+     * @var string query
152
+     * @since 0.5.0
153
+     */
154
+    const QUERY = 'query';
155
+
156
+    /**
157
+     * @var string next_page_token
158
+     * @since 0.5.0
159
+     */
160
+    const NEXT_PAGE_TOKEN = 'next_page_token';
161
+
162
+    /**
163
+     * @var string photoreference
164
+     * @since 0.6.0
165
+     */
166
+    const PHOTOREFERENCE = 'photoreference';
167
+
168
+    /**
169
+     * @var string maxwidth
170
+     * @since 0.6.0
171
+     */
172
+    const MAXWIDTH = 'maxwidth';
173
+
174
+    /**
175
+     * @var string maxheight
176
+     * @since 0.6.0
177
+     */
178
+    const MAXHEIGHT = 'maxheight';
179 179
 }
180 180
\ No newline at end of file
Please login to merge, or discard this patch.
src/Fields/GoogleMapsResultFields.php 1 patch
Indentation   +157 added lines, -157 removed lines patch added patch discarded remove patch
@@ -17,162 +17,162 @@
 block discarded – undo
17 17
 class GoogleMapsResultFields
18 18
 {
19 19
 
20
-	/**
21
-	 * @var string address_components
22
-	 */
23
-	const ADDRESS_COMPONENTS = 'address_components';
24
-
25
-	/**
26
-	 * @var string formatted_address
27
-	 */
28
-	const FORMATTED_ADDRESS = 'formatted_address';
29
-
30
-	/**
31
-	 * @var string geometry
32
-	 */
33
-	const GEOMETRY = 'geometry';
34
-
35
-	/**
36
-	 * @var string viewport
37
-	 */
38
-	const VIEWPORT = 'viewport';
39
-
40
-	/**
41
-	 * @var string place_id
42
-	 */
43
-	const PLACE_ID = 'place_id';
44
-
45
-	/**
46
-	 * @var string location_type
47
-	 */
48
-	const LOCATION_TYPE = 'location_type';
49
-
50
-	/**
51
-	 * @var string types
52
-	 */
53
-	const TYPES = 'types';
54
-
55
-	/**
56
-	 * @var string location
57
-	 */
58
-	const LOCATION = 'location';
59
-
60
-	/**
61
-	 * @var string elevation
62
-	 */
63
-	const ELEVATION = 'elevation';
64
-
65
-	/**
66
-	 * @var string resolution
67
-	 */
68
-	const RESOLUTION = 'resolution';
69
-
70
-	/**
71
-	 * @var string icon
72
-	 * @since 0.5.0
73
-	 */
74
-	const ICON = 'icon';
75
-
76
-	/**
77
-	 * @var string id
78
-	 * @since 0.5.0
79
-	 */
80
-	const ID = 'id';
81
-
82
-	/**
83
-	 * @var string name
84
-	 * @since 0.5.0
85
-	 */
86
-	const NAME = 'name';
87
-
88
-	/**
89
-	 * @var string photos
90
-	 * @since 0.5.0
91
-	 */
92
-	const PHOTOS = 'photos';
93
-
94
-	/**
95
-	 * @var string reference
96
-	 * @since 0.5.0
97
-	 */
98
-	const REFERENCE = 'reference';
99
-
100
-	/**
101
-	 * @var string vicinity
102
-	 * @since 0.5.0
103
-	 */
104
-	const VICINITY = 'vicinity';
105
-
106
-	/**
107
-	 * @var string opening_hours
108
-	 * @since 0.5.0
109
-	 */
110
-	const OPENING_HOURS = 'opening_hours';
111
-
112
-	/**
113
-	 * @var string price_level
114
-	 * @since 0.5.0
115
-	 */
116
-	const PRICE_LEVEL = 'price_level';
117
-
118
-	/**
119
-	 * @var string rating
120
-	 * @since 0.5.0
121
-	 */
122
-	const RATING = 'rating';
123
-
124
-	/**
125
-	 * @var string permanently_closed
126
-	 * @since 0.5.0
127
-	 */
128
-	const PERMANENTLY_CLOSED = 'permanently_closed';
129
-
130
-	/**
131
-	 * @var string plus_code
132
-	 * @since 0.5.0
133
-	 */
134
-	const PLUS_CODE = 'plus_code';
135
-
136
-	/**
137
-	 * @var string next_page_token
138
-	 * @since 0.5.0
139
-	 */
140
-	const NEXT_PAGE_TOKEN = 'next_page_token';
141
-
142
-	/**
143
-	 * @var string reviews
144
-	 * @since 0.6.0
145
-	 */
146
-	const REVIEWS = 'reviews';
147
-
148
-	/**
149
-	 * @var string utc_offset
150
-	 * @since 0.6.0
151
-	 */
152
-	const UTC_OFFSET = 'utc_offset';
153
-
154
-	/**
155
-	 * @var string website
156
-	 * @since 0.6.0
157
-	 */
158
-	const WEBSITE = 'website';
159
-
160
-	/**
161
-	 * @var string international_phone_number
162
-	 * @since 0.6.0
163
-	 */
164
-	const INTERNATIONAL_PHONE_NUMBER = 'international_phone_number';
165
-
166
-	/**
167
-	 * @var string formatted_phone_number
168
-	 * @since 0.6.0
169
-	 */
170
-	const FORMATTED_PHONE_NUMBER = 'formatted_phone_number';
171
-
172
-	/**
173
-	 * @var string adr_address
174
-	 * @since 0.6.0
175
-	 */
176
-	const ADR_ADDRESS = 'adr_address';
20
+    /**
21
+     * @var string address_components
22
+     */
23
+    const ADDRESS_COMPONENTS = 'address_components';
24
+
25
+    /**
26
+     * @var string formatted_address
27
+     */
28
+    const FORMATTED_ADDRESS = 'formatted_address';
29
+
30
+    /**
31
+     * @var string geometry
32
+     */
33
+    const GEOMETRY = 'geometry';
34
+
35
+    /**
36
+     * @var string viewport
37
+     */
38
+    const VIEWPORT = 'viewport';
39
+
40
+    /**
41
+     * @var string place_id
42
+     */
43
+    const PLACE_ID = 'place_id';
44
+
45
+    /**
46
+     * @var string location_type
47
+     */
48
+    const LOCATION_TYPE = 'location_type';
49
+
50
+    /**
51
+     * @var string types
52
+     */
53
+    const TYPES = 'types';
54
+
55
+    /**
56
+     * @var string location
57
+     */
58
+    const LOCATION = 'location';
59
+
60
+    /**
61
+     * @var string elevation
62
+     */
63
+    const ELEVATION = 'elevation';
64
+
65
+    /**
66
+     * @var string resolution
67
+     */
68
+    const RESOLUTION = 'resolution';
69
+
70
+    /**
71
+     * @var string icon
72
+     * @since 0.5.0
73
+     */
74
+    const ICON = 'icon';
75
+
76
+    /**
77
+     * @var string id
78
+     * @since 0.5.0
79
+     */
80
+    const ID = 'id';
81
+
82
+    /**
83
+     * @var string name
84
+     * @since 0.5.0
85
+     */
86
+    const NAME = 'name';
87
+
88
+    /**
89
+     * @var string photos
90
+     * @since 0.5.0
91
+     */
92
+    const PHOTOS = 'photos';
93
+
94
+    /**
95
+     * @var string reference
96
+     * @since 0.5.0
97
+     */
98
+    const REFERENCE = 'reference';
99
+
100
+    /**
101
+     * @var string vicinity
102
+     * @since 0.5.0
103
+     */
104
+    const VICINITY = 'vicinity';
105
+
106
+    /**
107
+     * @var string opening_hours
108
+     * @since 0.5.0
109
+     */
110
+    const OPENING_HOURS = 'opening_hours';
111
+
112
+    /**
113
+     * @var string price_level
114
+     * @since 0.5.0
115
+     */
116
+    const PRICE_LEVEL = 'price_level';
117
+
118
+    /**
119
+     * @var string rating
120
+     * @since 0.5.0
121
+     */
122
+    const RATING = 'rating';
123
+
124
+    /**
125
+     * @var string permanently_closed
126
+     * @since 0.5.0
127
+     */
128
+    const PERMANENTLY_CLOSED = 'permanently_closed';
129
+
130
+    /**
131
+     * @var string plus_code
132
+     * @since 0.5.0
133
+     */
134
+    const PLUS_CODE = 'plus_code';
135
+
136
+    /**
137
+     * @var string next_page_token
138
+     * @since 0.5.0
139
+     */
140
+    const NEXT_PAGE_TOKEN = 'next_page_token';
141
+
142
+    /**
143
+     * @var string reviews
144
+     * @since 0.6.0
145
+     */
146
+    const REVIEWS = 'reviews';
147
+
148
+    /**
149
+     * @var string utc_offset
150
+     * @since 0.6.0
151
+     */
152
+    const UTC_OFFSET = 'utc_offset';
153
+
154
+    /**
155
+     * @var string website
156
+     * @since 0.6.0
157
+     */
158
+    const WEBSITE = 'website';
159
+
160
+    /**
161
+     * @var string international_phone_number
162
+     * @since 0.6.0
163
+     */
164
+    const INTERNATIONAL_PHONE_NUMBER = 'international_phone_number';
165
+
166
+    /**
167
+     * @var string formatted_phone_number
168
+     * @since 0.6.0
169
+     */
170
+    const FORMATTED_PHONE_NUMBER = 'formatted_phone_number';
171
+
172
+    /**
173
+     * @var string adr_address
174
+     * @since 0.6.0
175
+     */
176
+    const ADR_ADDRESS = 'adr_address';
177 177
 
178 178
 }
179 179
\ No newline at end of file
Please login to merge, or discard this patch.
src/Fields/ReviewFields.php 1 patch
Indentation   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -18,43 +18,43 @@
 block discarded – undo
18 18
 class ReviewFields
19 19
 {
20 20
 
21
-	/**
22
-	 * @var string
23
-	 */
24
-	const AUTHOR_NAME = "author_name";
25
-
26
-	/**
27
-	 * @var string
28
-	 */
29
-	const AUTHOR_URL = "author_url";
30
-
31
-	/**
32
-	 * @var string
33
-	 */
34
-	const LANGUAGE = "language";
35
-
36
-	/**
37
-	 * @var string
38
-	 */
39
-	const PROFILE_PHOTO_URL = "profile_photo_url";
40
-
41
-	/**
42
-	 * @var string
43
-	 */
44
-	const RATING = "rating";
45
-
46
-	/**
47
-	 * @var string
48
-	 */
49
-	const RELATIVE_TIME_DESCRIPTION = "relative_time_description";
50
-
51
-	/**
52
-	 * @var string
53
-	 */
54
-	const TEXT = "text";
55
-
56
-	/**
57
-	 * @var string
58
-	 */
59
-	const TIME = "time";
21
+    /**
22
+     * @var string
23
+     */
24
+    const AUTHOR_NAME = "author_name";
25
+
26
+    /**
27
+     * @var string
28
+     */
29
+    const AUTHOR_URL = "author_url";
30
+
31
+    /**
32
+     * @var string
33
+     */
34
+    const LANGUAGE = "language";
35
+
36
+    /**
37
+     * @var string
38
+     */
39
+    const PROFILE_PHOTO_URL = "profile_photo_url";
40
+
41
+    /**
42
+     * @var string
43
+     */
44
+    const RATING = "rating";
45
+
46
+    /**
47
+     * @var string
48
+     */
49
+    const RELATIVE_TIME_DESCRIPTION = "relative_time_description";
50
+
51
+    /**
52
+     * @var string
53
+     */
54
+    const TEXT = "text";
55
+
56
+    /**
57
+     * @var string
58
+     */
59
+    const TIME = "time";
60 60
 }
61 61
\ No newline at end of file
Please login to merge, or discard this patch.
src/Enum/PlaceServicesEndpoints.php 1 patch
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -17,23 +17,23 @@
 block discarded – undo
17 17
 class PlaceServicesEndpoints
18 18
 {
19 19
 
20
-	/**
21
-	 * @var string
22
-	 */
23
-	const FINDPLACEFROMTEXT = "findplacefromtext";
20
+    /**
21
+     * @var string
22
+     */
23
+    const FINDPLACEFROMTEXT = "findplacefromtext";
24 24
 
25
-	/**
26
-	 * @var string
27
-	 */
28
-	const NEARBYSEARCH = "nearbysearch";
25
+    /**
26
+     * @var string
27
+     */
28
+    const NEARBYSEARCH = "nearbysearch";
29 29
 
30
-	/**
31
-	 * @var string
32
-	 */
33
-	const TEXTSEARCH = "textsearch";
30
+    /**
31
+     * @var string
32
+     */
33
+    const TEXTSEARCH = "textsearch";
34 34
 
35
-	/**
36
-	 * @var string
37
-	 */
38
-	const DETAILS = "details";
35
+    /**
36
+     * @var string
37
+     */
38
+    const DETAILS = "details";
39 39
 }
40 40
\ No newline at end of file
Please login to merge, or discard this patch.
src/Http/Result/PlacesResult.php 1 patch
Indentation   +136 added lines, -136 removed lines patch added patch discarded remove patch
@@ -39,141 +39,141 @@
 block discarded – undo
39 39
  */
40 40
 class PlacesResult extends GoogleMapsResult
41 41
 {
42
-  	/**
43
-	 * @var Address[]
44
-	 */
45
-	protected $address_components = null;
46
-
47
-	/**
48
-	 * @var null|string
49
-	 */
50
-	protected $formatted_address = null;
51
-
52
-	/**
53
-	 * @var string
54
-	 */
55
-	protected $name = '';
56
-
57
-	/**
58
-	 * @var Geometry
59
-	 */
60
-	protected $geometry = null;
61
-
62
-	/**
63
-	 * @var string
64
-	 */
65
-	protected $icon = '';
66
-
67
-	/**
68
-	 * @var string
69
-	 */
70
-	protected $id = '';
71
-
72
-	/**
73
-	 * @var PhotoCollection
74
-	 */
75
-	protected $photos = null;
76
-
77
-	/**
78
-	 * @var string
79
-	 */
80
-	protected $place_id = '';
81
-
82
-	/**
83
-	 * @var string
84
-	 */
85
-	protected $reference = '';
86
-
87
-	/**
88
-	 * @var string
89
-	 */
90
-	protected $vicinity = '';
91
-
92
-	/**
93
-	 * @var array
94
-	 */
95
-	protected $types = [];
96
-
97
-	/**
98
-	 * @var array
99
-	 */
100
-	protected $opening_hours = [];
101
-
102
-	/**
103
-	 * @var int
104
-	 */
105
-	protected $price_level = 0;
106
-
107
-	/**
108
-	 * @var bool
109
-	 */
110
-	protected $permanently_closed = false;
111
-
112
-	/**
113
-	 * @var ReviewCollection
114
-	 */
115
-	protected $reviews = null;
116
-
117
-	/**
118
-	 * @var int
119
-	 */
120
-	protected $utc_offset = 0;
121
-
122
-	/**
123
-	 * @var string
124
-	 */
125
-	protected $website = '';
126
-
127
-	/**
128
-	 * @var string
129
-	 */
130
-	protected $international_phone_number = '';
131
-
132
-	/**
133
-	 * @var string
134
-	 */
135
-	protected $formatted_phone_number = '';
136
-
137
-	/**
138
-	 * @var string
139
-	 */
140
-	protected $adr_address = '';
141
-
142
-	/**
143
-	 * @var array
144
-	 */
145
-	protected $typeCheck = [
146
-		GoogleMapsResultFields::ADDRESS_COMPONENTS         => Address::class,
147
-		GoogleMapsResultFields::FORMATTED_ADDRESS          => 'string',
148
-		GoogleMapsResultFields::NAME                       => 'string',
149
-		GoogleMapsResultFields::GEOMETRY                   => Geometry::class,
150
-		GoogleMapsResultFields::ICON                       => 'string',
151
-		GoogleMapsResultFields::ID                         => 'string',
152
-		GoogleMapsResultFields::PHOTOS                     => PhotoCollection::class,
153
-		GoogleMapsResultFields::PLACE_ID                   => 'string',
154
-		GoogleMapsResultFields::REFERENCE                  => 'string',
155
-		GoogleMapsResultFields::VICINITY                   => 'string',
156
-		GoogleMapsResultFields::TYPES                      => 'array',
157
-		GoogleMapsResultFields::OPENING_HOURS              => 'json',
158
-		GoogleMapsResultFields::PRICE_LEVEL                => 'int',
159
-		GoogleMapsResultFields::RATING                     => 'float',
160
-		GoogleMapsResultFields::PERMANENTLY_CLOSED         => 'bool',
161
-		GoogleMapsResultFields::PLUS_CODE                  => 'array',
162
-		GoogleMapsResultFields::REVIEWS                    => ReviewCollection::class,
163
-		GoogleMapsResultFields::UTC_OFFSET                 => 'int',
164
-		GoogleMapsResultFields::WEBSITE                    => 'string',
165
-		GoogleMapsResultFields::INTERNATIONAL_PHONE_NUMBER => 'string',
166
-		GoogleMapsResultFields::FORMATTED_PHONE_NUMBER     => 'string',
167
-		GoogleMapsResultFields::ADR_ADDRESS                => 'string',
168
-	];
169
-
170
-	/**
171
-	 * @return bool|null
172
-	 */
173
-	public function getPermanentlyClose(): bool
174
-	{
175
-
176
-		return $this->permanently_closed ?? false;
177
-	}
42
+        /**
43
+         * @var Address[]
44
+         */
45
+    protected $address_components = null;
46
+
47
+    /**
48
+     * @var null|string
49
+     */
50
+    protected $formatted_address = null;
51
+
52
+    /**
53
+     * @var string
54
+     */
55
+    protected $name = '';
56
+
57
+    /**
58
+     * @var Geometry
59
+     */
60
+    protected $geometry = null;
61
+
62
+    /**
63
+     * @var string
64
+     */
65
+    protected $icon = '';
66
+
67
+    /**
68
+     * @var string
69
+     */
70
+    protected $id = '';
71
+
72
+    /**
73
+     * @var PhotoCollection
74
+     */
75
+    protected $photos = null;
76
+
77
+    /**
78
+     * @var string
79
+     */
80
+    protected $place_id = '';
81
+
82
+    /**
83
+     * @var string
84
+     */
85
+    protected $reference = '';
86
+
87
+    /**
88
+     * @var string
89
+     */
90
+    protected $vicinity = '';
91
+
92
+    /**
93
+     * @var array
94
+     */
95
+    protected $types = [];
96
+
97
+    /**
98
+     * @var array
99
+     */
100
+    protected $opening_hours = [];
101
+
102
+    /**
103
+     * @var int
104
+     */
105
+    protected $price_level = 0;
106
+
107
+    /**
108
+     * @var bool
109
+     */
110
+    protected $permanently_closed = false;
111
+
112
+    /**
113
+     * @var ReviewCollection
114
+     */
115
+    protected $reviews = null;
116
+
117
+    /**
118
+     * @var int
119
+     */
120
+    protected $utc_offset = 0;
121
+
122
+    /**
123
+     * @var string
124
+     */
125
+    protected $website = '';
126
+
127
+    /**
128
+     * @var string
129
+     */
130
+    protected $international_phone_number = '';
131
+
132
+    /**
133
+     * @var string
134
+     */
135
+    protected $formatted_phone_number = '';
136
+
137
+    /**
138
+     * @var string
139
+     */
140
+    protected $adr_address = '';
141
+
142
+    /**
143
+     * @var array
144
+     */
145
+    protected $typeCheck = [
146
+        GoogleMapsResultFields::ADDRESS_COMPONENTS         => Address::class,
147
+        GoogleMapsResultFields::FORMATTED_ADDRESS          => 'string',
148
+        GoogleMapsResultFields::NAME                       => 'string',
149
+        GoogleMapsResultFields::GEOMETRY                   => Geometry::class,
150
+        GoogleMapsResultFields::ICON                       => 'string',
151
+        GoogleMapsResultFields::ID                         => 'string',
152
+        GoogleMapsResultFields::PHOTOS                     => PhotoCollection::class,
153
+        GoogleMapsResultFields::PLACE_ID                   => 'string',
154
+        GoogleMapsResultFields::REFERENCE                  => 'string',
155
+        GoogleMapsResultFields::VICINITY                   => 'string',
156
+        GoogleMapsResultFields::TYPES                      => 'array',
157
+        GoogleMapsResultFields::OPENING_HOURS              => 'json',
158
+        GoogleMapsResultFields::PRICE_LEVEL                => 'int',
159
+        GoogleMapsResultFields::RATING                     => 'float',
160
+        GoogleMapsResultFields::PERMANENTLY_CLOSED         => 'bool',
161
+        GoogleMapsResultFields::PLUS_CODE                  => 'array',
162
+        GoogleMapsResultFields::REVIEWS                    => ReviewCollection::class,
163
+        GoogleMapsResultFields::UTC_OFFSET                 => 'int',
164
+        GoogleMapsResultFields::WEBSITE                    => 'string',
165
+        GoogleMapsResultFields::INTERNATIONAL_PHONE_NUMBER => 'string',
166
+        GoogleMapsResultFields::FORMATTED_PHONE_NUMBER     => 'string',
167
+        GoogleMapsResultFields::ADR_ADDRESS                => 'string',
168
+    ];
169
+
170
+    /**
171
+     * @return bool|null
172
+     */
173
+    public function getPermanentlyClose(): bool
174
+    {
175
+
176
+        return $this->permanently_closed ?? false;
177
+    }
178 178
 
179 179
 }
180 180
\ No newline at end of file
Please login to merge, or discard this patch.