@@ -16,13 +16,13 @@ |
||
16 | 16 | */ |
17 | 17 | class GoogleMapsRequestMethodValues { |
18 | 18 | |
19 | - /** |
|
20 | - * string: get |
|
21 | - */ |
|
22 | - const GET = 'get'; |
|
19 | + /** |
|
20 | + * string: get |
|
21 | + */ |
|
22 | + const GET = 'get'; |
|
23 | 23 | |
24 | - /** |
|
25 | - * string: post |
|
26 | - */ |
|
27 | - const POST = 'post'; |
|
24 | + /** |
|
25 | + * string: post |
|
26 | + */ |
|
27 | + const POST = 'post'; |
|
28 | 28 | } |
29 | 29 | \ No newline at end of file |
@@ -22,205 +22,205 @@ |
||
22 | 22 | */ |
23 | 23 | class GoogleMapsResponse { |
24 | 24 | |
25 | - /** |
|
26 | - * @var Response |
|
27 | - */ |
|
28 | - protected $response = null; |
|
29 | - |
|
30 | - /** |
|
31 | - * @var array |
|
32 | - */ |
|
33 | - protected $results = null; |
|
34 | - |
|
35 | - /** |
|
36 | - * @var string |
|
37 | - */ |
|
38 | - protected $status = null; |
|
39 | - |
|
40 | - /** |
|
41 | - * @var string |
|
42 | - */ |
|
43 | - protected $error_message = null; |
|
44 | - |
|
45 | - /** |
|
46 | - * @var array |
|
47 | - */ |
|
48 | - protected $array_response = null; |
|
49 | - |
|
50 | - /** |
|
51 | - * @var int |
|
52 | - */ |
|
53 | - protected $http_status_code = null; |
|
54 | - |
|
55 | - /** |
|
56 | - * GoogleMapsResponse constructor. |
|
57 | - * |
|
58 | - * @param Response $response |
|
59 | - */ |
|
60 | - public function __construct(Response $response) { |
|
61 | - |
|
62 | - $this->setResponse($response); |
|
63 | - |
|
64 | - $this->parseResponse(); |
|
65 | - |
|
66 | - $this->checkHttpStatusCode(); |
|
67 | - } |
|
68 | - |
|
69 | - /** |
|
70 | - * @param Response $response |
|
71 | - * |
|
72 | - * @return GoogleMapsResponse |
|
73 | - */ |
|
74 | - public function setResponse(Response $response): GoogleMapsResponse { |
|
75 | - |
|
76 | - $this->response = $response; |
|
77 | - |
|
78 | - return $this; |
|
79 | - } |
|
80 | - |
|
81 | - /** |
|
82 | - * @return GoogleMapsResponse |
|
83 | - * |
|
84 | - * @throws RequestException |
|
85 | - * @throws ResponseException |
|
86 | - */ |
|
87 | - protected function parseResponse(): GoogleMapsResponse { |
|
88 | - |
|
89 | - $json_response = $this->response->getBody()->getContents(); |
|
90 | - $array_response = $this->toArray($json_response); |
|
91 | - |
|
92 | - if (is_null($array_response[GoogleMapsResponseFields::RESULTS])) { |
|
93 | - throw new ResponseException('Missing "results" in GoogleMapsApi Response'); |
|
94 | - } |
|
95 | - $this->setResults($array_response[GoogleMapsResponseFields::RESULTS]); |
|
96 | - |
|
97 | - if (empty($array_response[GoogleMapsResponseFields::STATUS])) { |
|
98 | - throw new ResponseException('Missing "status" in GoogleMapsApi Response'); |
|
99 | - } |
|
100 | - $this->setStatus($array_response[GoogleMapsResponseFields::STATUS]); |
|
101 | - |
|
102 | - if ($this->getStatus() != GoogleMapsResponseStatusValues::OK) { |
|
103 | - $error_message = 'Something went wrong'; |
|
104 | - if (!empty($array_response[GoogleMapsResponseFields::ERROR_MESSAGE])) { |
|
105 | - $error_message = $array_response[GoogleMapsResponseFields::ERROR_MESSAGE]; |
|
106 | - $this->setErrorMessage($error_message); |
|
107 | - } |
|
108 | - throw new RequestException($error_message); |
|
109 | - |
|
110 | - } |
|
111 | - |
|
112 | - return $this; |
|
113 | - } |
|
114 | - |
|
115 | - /** |
|
116 | - * Check HTTP status code (silent/No exceptions!) |
|
117 | - * @return int |
|
118 | - */ |
|
119 | - protected function checkHttpStatusCode(): int { |
|
120 | - |
|
121 | - $this->http_status_code = $this->response->getStatusCode(); |
|
122 | - |
|
123 | - return $this->http_status_code; |
|
124 | - } |
|
125 | - |
|
126 | - /** |
|
127 | - * @param string $json_response |
|
128 | - * |
|
129 | - * @return array |
|
130 | - */ |
|
131 | - public function toArray(string $json_response): array { |
|
132 | - |
|
133 | - $this->array_response = json_decode($json_response, true); |
|
134 | - |
|
135 | - return $this->array_response; |
|
136 | - } |
|
137 | - |
|
138 | - /** |
|
139 | - * @return array |
|
140 | - */ |
|
141 | - public function getResults() { |
|
142 | - |
|
143 | - return $this->results; |
|
144 | - } |
|
145 | - |
|
146 | - /** |
|
147 | - * @param array $results |
|
148 | - * |
|
149 | - * @return $this |
|
150 | - */ |
|
151 | - public function setResults(array $results) { |
|
152 | - |
|
153 | - $this->results = $results; |
|
25 | + /** |
|
26 | + * @var Response |
|
27 | + */ |
|
28 | + protected $response = null; |
|
29 | + |
|
30 | + /** |
|
31 | + * @var array |
|
32 | + */ |
|
33 | + protected $results = null; |
|
34 | + |
|
35 | + /** |
|
36 | + * @var string |
|
37 | + */ |
|
38 | + protected $status = null; |
|
39 | + |
|
40 | + /** |
|
41 | + * @var string |
|
42 | + */ |
|
43 | + protected $error_message = null; |
|
44 | + |
|
45 | + /** |
|
46 | + * @var array |
|
47 | + */ |
|
48 | + protected $array_response = null; |
|
49 | + |
|
50 | + /** |
|
51 | + * @var int |
|
52 | + */ |
|
53 | + protected $http_status_code = null; |
|
54 | + |
|
55 | + /** |
|
56 | + * GoogleMapsResponse constructor. |
|
57 | + * |
|
58 | + * @param Response $response |
|
59 | + */ |
|
60 | + public function __construct(Response $response) { |
|
61 | + |
|
62 | + $this->setResponse($response); |
|
63 | + |
|
64 | + $this->parseResponse(); |
|
65 | + |
|
66 | + $this->checkHttpStatusCode(); |
|
67 | + } |
|
68 | + |
|
69 | + /** |
|
70 | + * @param Response $response |
|
71 | + * |
|
72 | + * @return GoogleMapsResponse |
|
73 | + */ |
|
74 | + public function setResponse(Response $response): GoogleMapsResponse { |
|
75 | + |
|
76 | + $this->response = $response; |
|
77 | + |
|
78 | + return $this; |
|
79 | + } |
|
80 | + |
|
81 | + /** |
|
82 | + * @return GoogleMapsResponse |
|
83 | + * |
|
84 | + * @throws RequestException |
|
85 | + * @throws ResponseException |
|
86 | + */ |
|
87 | + protected function parseResponse(): GoogleMapsResponse { |
|
88 | + |
|
89 | + $json_response = $this->response->getBody()->getContents(); |
|
90 | + $array_response = $this->toArray($json_response); |
|
91 | + |
|
92 | + if (is_null($array_response[GoogleMapsResponseFields::RESULTS])) { |
|
93 | + throw new ResponseException('Missing "results" in GoogleMapsApi Response'); |
|
94 | + } |
|
95 | + $this->setResults($array_response[GoogleMapsResponseFields::RESULTS]); |
|
96 | + |
|
97 | + if (empty($array_response[GoogleMapsResponseFields::STATUS])) { |
|
98 | + throw new ResponseException('Missing "status" in GoogleMapsApi Response'); |
|
99 | + } |
|
100 | + $this->setStatus($array_response[GoogleMapsResponseFields::STATUS]); |
|
101 | + |
|
102 | + if ($this->getStatus() != GoogleMapsResponseStatusValues::OK) { |
|
103 | + $error_message = 'Something went wrong'; |
|
104 | + if (!empty($array_response[GoogleMapsResponseFields::ERROR_MESSAGE])) { |
|
105 | + $error_message = $array_response[GoogleMapsResponseFields::ERROR_MESSAGE]; |
|
106 | + $this->setErrorMessage($error_message); |
|
107 | + } |
|
108 | + throw new RequestException($error_message); |
|
109 | + |
|
110 | + } |
|
111 | + |
|
112 | + return $this; |
|
113 | + } |
|
114 | + |
|
115 | + /** |
|
116 | + * Check HTTP status code (silent/No exceptions!) |
|
117 | + * @return int |
|
118 | + */ |
|
119 | + protected function checkHttpStatusCode(): int { |
|
120 | + |
|
121 | + $this->http_status_code = $this->response->getStatusCode(); |
|
122 | + |
|
123 | + return $this->http_status_code; |
|
124 | + } |
|
125 | + |
|
126 | + /** |
|
127 | + * @param string $json_response |
|
128 | + * |
|
129 | + * @return array |
|
130 | + */ |
|
131 | + public function toArray(string $json_response): array { |
|
132 | + |
|
133 | + $this->array_response = json_decode($json_response, true); |
|
134 | + |
|
135 | + return $this->array_response; |
|
136 | + } |
|
137 | + |
|
138 | + /** |
|
139 | + * @return array |
|
140 | + */ |
|
141 | + public function getResults() { |
|
142 | + |
|
143 | + return $this->results; |
|
144 | + } |
|
145 | + |
|
146 | + /** |
|
147 | + * @param array $results |
|
148 | + * |
|
149 | + * @return $this |
|
150 | + */ |
|
151 | + public function setResults(array $results) { |
|
152 | + |
|
153 | + $this->results = $results; |
|
154 | 154 | |
155 | - return $this; |
|
156 | - } |
|
157 | - |
|
158 | - /** |
|
159 | - * @return string |
|
160 | - */ |
|
161 | - public function getStatus(): string { |
|
155 | + return $this; |
|
156 | + } |
|
157 | + |
|
158 | + /** |
|
159 | + * @return string |
|
160 | + */ |
|
161 | + public function getStatus(): string { |
|
162 | 162 | |
163 | - return $this->status; |
|
164 | - } |
|
165 | - |
|
166 | - /** |
|
167 | - * @param string $status |
|
168 | - * |
|
169 | - * @return GoogleMapsResponse |
|
170 | - */ |
|
171 | - public function setStatus(string $status) { |
|
172 | - |
|
173 | - $this->status = $status; |
|
163 | + return $this->status; |
|
164 | + } |
|
165 | + |
|
166 | + /** |
|
167 | + * @param string $status |
|
168 | + * |
|
169 | + * @return GoogleMapsResponse |
|
170 | + */ |
|
171 | + public function setStatus(string $status) { |
|
172 | + |
|
173 | + $this->status = $status; |
|
174 | 174 | |
175 | - return $this; |
|
176 | - } |
|
177 | - |
|
178 | - /** |
|
179 | - * @return array |
|
180 | - */ |
|
181 | - public function getArrayResponse(): array { |
|
182 | - |
|
183 | - return $this->array_response; |
|
184 | - } |
|
185 | - |
|
186 | - /** |
|
187 | - * @param array $array_response |
|
188 | - * |
|
189 | - * @return GoogleMapsResponse |
|
190 | - */ |
|
191 | - public function setArrayResponse(array $array_response): GoogleMapsResponse { |
|
192 | - |
|
193 | - $this->array_response = $array_response; |
|
175 | + return $this; |
|
176 | + } |
|
177 | + |
|
178 | + /** |
|
179 | + * @return array |
|
180 | + */ |
|
181 | + public function getArrayResponse(): array { |
|
182 | + |
|
183 | + return $this->array_response; |
|
184 | + } |
|
185 | + |
|
186 | + /** |
|
187 | + * @param array $array_response |
|
188 | + * |
|
189 | + * @return GoogleMapsResponse |
|
190 | + */ |
|
191 | + public function setArrayResponse(array $array_response): GoogleMapsResponse { |
|
192 | + |
|
193 | + $this->array_response = $array_response; |
|
194 | 194 | |
195 | - return $this; |
|
196 | - } |
|
197 | - |
|
198 | - /** |
|
199 | - * @return mixed |
|
200 | - */ |
|
201 | - public function getErrorMessage() { |
|
195 | + return $this; |
|
196 | + } |
|
197 | + |
|
198 | + /** |
|
199 | + * @return mixed |
|
200 | + */ |
|
201 | + public function getErrorMessage() { |
|
202 | 202 | |
203 | - return $this->error_message; |
|
204 | - } |
|
203 | + return $this->error_message; |
|
204 | + } |
|
205 | 205 | |
206 | - /** |
|
207 | - * @param $error_message |
|
208 | - * |
|
209 | - * @return GoogleMapsResponse |
|
210 | - */ |
|
211 | - public function setErrorMessage($error_message): GoogleMapsResponse { |
|
206 | + /** |
|
207 | + * @param $error_message |
|
208 | + * |
|
209 | + * @return GoogleMapsResponse |
|
210 | + */ |
|
211 | + public function setErrorMessage($error_message): GoogleMapsResponse { |
|
212 | 212 | |
213 | - $this->error_message = $error_message; |
|
213 | + $this->error_message = $error_message; |
|
214 | 214 | |
215 | - return $this; |
|
216 | - } |
|
215 | + return $this; |
|
216 | + } |
|
217 | 217 | |
218 | - /** |
|
219 | - * @return int |
|
220 | - */ |
|
221 | - public function getHttpStatusCode(): int { |
|
218 | + /** |
|
219 | + * @return int |
|
220 | + */ |
|
221 | + public function getHttpStatusCode(): int { |
|
222 | 222 | |
223 | - return intval($this->http_status_code); |
|
224 | - } |
|
223 | + return intval($this->http_status_code); |
|
224 | + } |
|
225 | 225 | |
226 | 226 | } |
227 | 227 | \ No newline at end of file |
@@ -16,46 +16,46 @@ |
||
16 | 16 | |
17 | 17 | class GoogleMapsClient { |
18 | 18 | |
19 | - /** |
|
20 | - * @var Client |
|
21 | - */ |
|
22 | - protected $client = null; |
|
23 | - |
|
24 | - /** |
|
25 | - * GeocoderClient constructor. |
|
26 | - */ |
|
27 | - public function __construct() { |
|
28 | - |
|
29 | - $this->setClient(new Client()); |
|
30 | - } |
|
31 | - |
|
32 | - /** |
|
33 | - * @param null $client |
|
34 | - * |
|
35 | - * @return GoogleMapsClient |
|
36 | - */ |
|
37 | - public function setClient($client) { |
|
38 | - |
|
39 | - $this->client = $client; |
|
40 | - |
|
41 | - return $this; |
|
42 | - } |
|
43 | - |
|
44 | - /** |
|
45 | - * @param string $url |
|
46 | - * @param null|string $query |
|
47 | - * |
|
48 | - * @return \Biscolab\GoogleMaps\Http\GoogleMapsResponse |
|
49 | - */ |
|
50 | - public function get(string $url, ?string $query = null): GoogleMapsResponse { |
|
51 | - |
|
52 | - $client_params = $query ? [ |
|
53 | - 'query' => $query |
|
54 | - ] : null; |
|
55 | - |
|
56 | - /** @var Response $res */ |
|
57 | - $res = $this->client->request(GoogleMapsRequestMethodValues::GET, $url, $client_params); |
|
58 | - |
|
59 | - return new GoogleMapsResponse($res); |
|
60 | - } |
|
19 | + /** |
|
20 | + * @var Client |
|
21 | + */ |
|
22 | + protected $client = null; |
|
23 | + |
|
24 | + /** |
|
25 | + * GeocoderClient constructor. |
|
26 | + */ |
|
27 | + public function __construct() { |
|
28 | + |
|
29 | + $this->setClient(new Client()); |
|
30 | + } |
|
31 | + |
|
32 | + /** |
|
33 | + * @param null $client |
|
34 | + * |
|
35 | + * @return GoogleMapsClient |
|
36 | + */ |
|
37 | + public function setClient($client) { |
|
38 | + |
|
39 | + $this->client = $client; |
|
40 | + |
|
41 | + return $this; |
|
42 | + } |
|
43 | + |
|
44 | + /** |
|
45 | + * @param string $url |
|
46 | + * @param null|string $query |
|
47 | + * |
|
48 | + * @return \Biscolab\GoogleMaps\Http\GoogleMapsResponse |
|
49 | + */ |
|
50 | + public function get(string $url, ?string $query = null): GoogleMapsResponse { |
|
51 | + |
|
52 | + $client_params = $query ? [ |
|
53 | + 'query' => $query |
|
54 | + ] : null; |
|
55 | + |
|
56 | + /** @var Response $res */ |
|
57 | + $res = $this->client->request(GoogleMapsRequestMethodValues::GET, $url, $client_params); |
|
58 | + |
|
59 | + return new GoogleMapsResponse($res); |
|
60 | + } |
|
61 | 61 | } |
62 | 62 | \ No newline at end of file |
@@ -34,48 +34,48 @@ |
||
34 | 34 | */ |
35 | 35 | class GeocodingResult extends GoogleMapsResult { |
36 | 36 | |
37 | - /** |
|
38 | - * @var Address |
|
39 | - */ |
|
40 | - protected $address_components = null; |
|
37 | + /** |
|
38 | + * @var Address |
|
39 | + */ |
|
40 | + protected $address_components = null; |
|
41 | 41 | |
42 | - /** |
|
43 | - * @var string |
|
44 | - */ |
|
45 | - protected $formatted_address = null; |
|
42 | + /** |
|
43 | + * @var string |
|
44 | + */ |
|
45 | + protected $formatted_address = null; |
|
46 | 46 | |
47 | - /** |
|
48 | - * @var Geometry |
|
49 | - */ |
|
50 | - protected $geometry = null; |
|
47 | + /** |
|
48 | + * @var Geometry |
|
49 | + */ |
|
50 | + protected $geometry = null; |
|
51 | 51 | |
52 | - /** |
|
53 | - * @var string |
|
54 | - */ |
|
55 | - protected $place_id = null; |
|
52 | + /** |
|
53 | + * @var string |
|
54 | + */ |
|
55 | + protected $place_id = null; |
|
56 | 56 | |
57 | - /** |
|
58 | - * @var array |
|
59 | - */ |
|
60 | - protected $types = null; |
|
57 | + /** |
|
58 | + * @var array |
|
59 | + */ |
|
60 | + protected $types = null; |
|
61 | 61 | |
62 | - /** |
|
63 | - * @var array |
|
64 | - */ |
|
65 | - protected $typeCheck = [ |
|
66 | - GoogleMapsResultFields::GEOMETRY => Geometry::class, |
|
67 | - GoogleMapsResultFields::ADDRESS_COMPONENTS => Address::class, |
|
68 | - GoogleMapsResultFields::FORMATTED_ADDRESS => 'string', |
|
69 | - GoogleMapsResultFields::PLACE_ID => 'string', |
|
70 | - GoogleMapsResultFields::TYPES => 'array' |
|
71 | - ]; |
|
62 | + /** |
|
63 | + * @var array |
|
64 | + */ |
|
65 | + protected $typeCheck = [ |
|
66 | + GoogleMapsResultFields::GEOMETRY => Geometry::class, |
|
67 | + GoogleMapsResultFields::ADDRESS_COMPONENTS => Address::class, |
|
68 | + GoogleMapsResultFields::FORMATTED_ADDRESS => 'string', |
|
69 | + GoogleMapsResultFields::PLACE_ID => 'string', |
|
70 | + GoogleMapsResultFields::TYPES => 'array' |
|
71 | + ]; |
|
72 | 72 | |
73 | - /** |
|
74 | - * @return Address |
|
75 | - */ |
|
76 | - public function getAddress(): Address { |
|
73 | + /** |
|
74 | + * @return Address |
|
75 | + */ |
|
76 | + public function getAddress(): Address { |
|
77 | 77 | |
78 | - return $this->getAddressComponents(); |
|
79 | - } |
|
78 | + return $this->getAddressComponents(); |
|
79 | + } |
|
80 | 80 | |
81 | 81 | } |
82 | 82 | \ No newline at end of file |
@@ -18,50 +18,50 @@ |
||
18 | 18 | */ |
19 | 19 | class GoogleMapsRequest { |
20 | 20 | |
21 | - /** |
|
22 | - * @var array |
|
23 | - */ |
|
24 | - private $params = []; |
|
21 | + /** |
|
22 | + * @var array |
|
23 | + */ |
|
24 | + private $params = []; |
|
25 | 25 | |
26 | - /** |
|
27 | - * GoogleMapsRequest constructor. |
|
28 | - * |
|
29 | - * @param array $params |
|
30 | - */ |
|
31 | - public function __construct(array $params = []) { |
|
26 | + /** |
|
27 | + * GoogleMapsRequest constructor. |
|
28 | + * |
|
29 | + * @param array $params |
|
30 | + */ |
|
31 | + public function __construct(array $params = []) { |
|
32 | 32 | |
33 | - if ($params) { |
|
34 | - foreach ($params as $param_name => $param_value) { |
|
35 | - $this->addParam($param_name, $param_value); |
|
36 | - } |
|
37 | - } |
|
38 | - } |
|
33 | + if ($params) { |
|
34 | + foreach ($params as $param_name => $param_value) { |
|
35 | + $this->addParam($param_name, $param_value); |
|
36 | + } |
|
37 | + } |
|
38 | + } |
|
39 | 39 | |
40 | - /** |
|
41 | - * @param string $param_name |
|
42 | - * @param AbstractObject $param_value |
|
43 | - * |
|
44 | - * @return GoogleMapsRequest |
|
45 | - */ |
|
46 | - public function addParam(string $param_name, $param_value): GoogleMapsRequest { |
|
40 | + /** |
|
41 | + * @param string $param_name |
|
42 | + * @param AbstractObject $param_value |
|
43 | + * |
|
44 | + * @return GoogleMapsRequest |
|
45 | + */ |
|
46 | + public function addParam(string $param_name, $param_value): GoogleMapsRequest { |
|
47 | 47 | |
48 | - $this->params[$param_name] = $param_value; |
|
48 | + $this->params[$param_name] = $param_value; |
|
49 | 49 | |
50 | - return $this; |
|
51 | - } |
|
50 | + return $this; |
|
51 | + } |
|
52 | 52 | |
53 | - /** |
|
54 | - * @return string |
|
55 | - */ |
|
56 | - public function getQuery(): string { |
|
53 | + /** |
|
54 | + * @return string |
|
55 | + */ |
|
56 | + public function getQuery(): string { |
|
57 | 57 | |
58 | - $params = []; |
|
58 | + $params = []; |
|
59 | 59 | |
60 | - foreach ($this->params as $param_name => $param_value) { |
|
61 | - $params[$param_name] = (string)$param_value; |
|
62 | - } |
|
60 | + foreach ($this->params as $param_name => $param_value) { |
|
61 | + $params[$param_name] = (string)$param_value; |
|
62 | + } |
|
63 | 63 | |
64 | - return http_build_query($params); |
|
65 | - } |
|
64 | + return http_build_query($params); |
|
65 | + } |
|
66 | 66 | |
67 | 67 | } |
68 | 68 | \ No newline at end of file |
@@ -58,7 +58,7 @@ |
||
58 | 58 | $params = []; |
59 | 59 | |
60 | 60 | foreach ($this->params as $param_name => $param_value) { |
61 | - $params[$param_name] = (string)$param_value; |
|
61 | + $params[$param_name] = (string) $param_value; |
|
62 | 62 | } |
63 | 63 | |
64 | 64 | return http_build_query($params); |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | */ |
18 | 18 | function camel2Snake(string $camel): string { |
19 | 19 | |
20 | - return preg_replace('/^_/', '', strtolower(implode('_', preg_split('/(?=[A-Z])/', $camel)))); |
|
20 | + return preg_replace('/^_/', '', strtolower(implode('_', preg_split('/(?=[A-Z])/', $camel)))); |
|
21 | 21 | } |
22 | 22 | |
23 | 23 | /** |
@@ -27,5 +27,5 @@ discard block |
||
27 | 27 | */ |
28 | 28 | function snake2Camel(string $snake): string { |
29 | 29 | |
30 | - return lcfirst(preg_replace('/_/', '', ucwords($snake, '_'))); |
|
30 | + return lcfirst(preg_replace('/_/', '', ucwords($snake, '_'))); |
|
31 | 31 | } |
32 | 32 | \ No newline at end of file |
@@ -18,23 +18,23 @@ |
||
18 | 18 | */ |
19 | 19 | class GeometryLocationTypeValues { |
20 | 20 | |
21 | - /** |
|
22 | - * string: ROOFTOP |
|
23 | - */ |
|
24 | - const ROOFTOP = 'ROOFTOP'; |
|
21 | + /** |
|
22 | + * string: ROOFTOP |
|
23 | + */ |
|
24 | + const ROOFTOP = 'ROOFTOP'; |
|
25 | 25 | |
26 | - /** |
|
27 | - * string: RANGE_INTERPOLATED |
|
28 | - */ |
|
29 | - const RANGE_INTERPOLATED = 'RANGE_INTERPOLATED'; |
|
26 | + /** |
|
27 | + * string: RANGE_INTERPOLATED |
|
28 | + */ |
|
29 | + const RANGE_INTERPOLATED = 'RANGE_INTERPOLATED'; |
|
30 | 30 | |
31 | - /** |
|
32 | - * string: GEOMETRIC_CENTER |
|
33 | - */ |
|
34 | - const GEOMETRIC_CENTER = 'GEOMETRIC_CENTER'; |
|
31 | + /** |
|
32 | + * string: GEOMETRIC_CENTER |
|
33 | + */ |
|
34 | + const GEOMETRIC_CENTER = 'GEOMETRIC_CENTER'; |
|
35 | 35 | |
36 | - /** |
|
37 | - * string: APPROXIMATE |
|
38 | - */ |
|
39 | - const APPROXIMATE = 'APPROXIMATE'; |
|
36 | + /** |
|
37 | + * string: APPROXIMATE |
|
38 | + */ |
|
39 | + const APPROXIMATE = 'APPROXIMATE'; |
|
40 | 40 | } |
41 | 41 | \ No newline at end of file |
@@ -18,39 +18,39 @@ |
||
18 | 18 | */ |
19 | 19 | class GoogleMapsResponseStatusValues { |
20 | 20 | |
21 | - /** |
|
22 | - * string: OK |
|
23 | - */ |
|
24 | - const OK = 'OK'; |
|
25 | - |
|
26 | - /** |
|
27 | - * string: REQUEST_DENIED |
|
28 | - */ |
|
29 | - const REQUEST_DENIED = 'REQUEST_DENIED'; |
|
30 | - |
|
31 | - /** |
|
32 | - * string: ZERO_RESULTS |
|
33 | - */ |
|
34 | - const ZERO_RESULTS = 'ZERO_RESULTS'; |
|
35 | - |
|
36 | - /** |
|
37 | - * string: OVER_DAILY_LIMIT |
|
38 | - */ |
|
39 | - const OVER_DAILY_LIMIT = 'OVER_DAILY_LIMIT'; |
|
40 | - |
|
41 | - /** |
|
42 | - * string: OVER_QUERY_LIMIT |
|
43 | - */ |
|
44 | - const OVER_QUERY_LIMIT = 'OVER_QUERY_LIMIT'; |
|
45 | - |
|
46 | - /** |
|
47 | - * string: INVALID_REQUEST |
|
48 | - */ |
|
49 | - const INVALID_REQUEST = 'INVALID_REQUEST'; |
|
50 | - |
|
51 | - /** |
|
52 | - * string: UNKNOWN_ERROR |
|
53 | - */ |
|
54 | - const UNKNOWN_ERROR = 'UNKNOWN_ERROR'; |
|
21 | + /** |
|
22 | + * string: OK |
|
23 | + */ |
|
24 | + const OK = 'OK'; |
|
25 | + |
|
26 | + /** |
|
27 | + * string: REQUEST_DENIED |
|
28 | + */ |
|
29 | + const REQUEST_DENIED = 'REQUEST_DENIED'; |
|
30 | + |
|
31 | + /** |
|
32 | + * string: ZERO_RESULTS |
|
33 | + */ |
|
34 | + const ZERO_RESULTS = 'ZERO_RESULTS'; |
|
35 | + |
|
36 | + /** |
|
37 | + * string: OVER_DAILY_LIMIT |
|
38 | + */ |
|
39 | + const OVER_DAILY_LIMIT = 'OVER_DAILY_LIMIT'; |
|
40 | + |
|
41 | + /** |
|
42 | + * string: OVER_QUERY_LIMIT |
|
43 | + */ |
|
44 | + const OVER_QUERY_LIMIT = 'OVER_QUERY_LIMIT'; |
|
45 | + |
|
46 | + /** |
|
47 | + * string: INVALID_REQUEST |
|
48 | + */ |
|
49 | + const INVALID_REQUEST = 'INVALID_REQUEST'; |
|
50 | + |
|
51 | + /** |
|
52 | + * string: UNKNOWN_ERROR |
|
53 | + */ |
|
54 | + const UNKNOWN_ERROR = 'UNKNOWN_ERROR'; |
|
55 | 55 | |
56 | 56 | } |
57 | 57 | \ No newline at end of file |
@@ -16,19 +16,19 @@ |
||
16 | 16 | */ |
17 | 17 | class GeometryFields { |
18 | 18 | |
19 | - /** |
|
20 | - * string: location |
|
21 | - */ |
|
22 | - const LOCATION = 'location'; |
|
19 | + /** |
|
20 | + * string: location |
|
21 | + */ |
|
22 | + const LOCATION = 'location'; |
|
23 | 23 | |
24 | - /** |
|
25 | - * string: location_type |
|
26 | - */ |
|
27 | - const LOCATION_TYPE = 'location_type'; |
|
24 | + /** |
|
25 | + * string: location_type |
|
26 | + */ |
|
27 | + const LOCATION_TYPE = 'location_type'; |
|
28 | 28 | |
29 | - /** |
|
30 | - * string: viewport |
|
31 | - */ |
|
32 | - const VIEWPORT = 'viewport'; |
|
29 | + /** |
|
30 | + * string: viewport |
|
31 | + */ |
|
32 | + const VIEWPORT = 'viewport'; |
|
33 | 33 | |
34 | 34 | } |
35 | 35 | \ No newline at end of file |