@@ -72,15 +72,15 @@ discard block |
||
72 | 72 | 'connection_timeout' => 5, |
73 | 73 | ]); |
74 | 74 | } |
75 | - else if($http_client instanceof Client) |
|
75 | + else if ($http_client instanceof Client) |
|
76 | 76 | { |
77 | 77 | $application_url_client = $http_client->getConfig('base_uri'); |
78 | 78 | |
79 | - if(!isset($application_url_client)) |
|
79 | + if (!isset($application_url_client)) |
|
80 | 80 | { |
81 | 81 | $http_client->setDefaultOption('base_uri', $application_url); |
82 | 82 | } |
83 | - else if($application_url_client != $application_url) |
|
83 | + else if ($application_url_client != $application_url) |
|
84 | 84 | { |
85 | 85 | throw new InvalidParameterException("http_client parameter has a differente url to application_url parameter"); |
86 | 86 | } |
@@ -90,8 +90,8 @@ discard block |
||
90 | 90 | throw new InvalidParameterException("http_client parameter must be a GuzzleHttp\Client object or empty"); |
91 | 91 | } |
92 | 92 | |
93 | - $this->application_url = $application_url; |
|
94 | - $this->http_client = $http_client; |
|
93 | + $this->application_url = $application_url; |
|
94 | + $this->http_client = $http_client; |
|
95 | 95 | |
96 | 96 | //Create base |
97 | 97 | $this->baseSearch = new Search(); |
@@ -131,12 +131,12 @@ discard block |
||
131 | 131 | private function decodeResponse($format, Request $request, Response $response) |
132 | 132 | { |
133 | 133 | |
134 | - if($format == 'json') |
|
134 | + if ($format == 'json') |
|
135 | 135 | { |
136 | 136 | return json_decode($response->getBody(), true); |
137 | 137 | } |
138 | 138 | |
139 | - if($format == 'xml') |
|
139 | + if ($format == 'xml') |
|
140 | 140 | { |
141 | 141 | return new \SimpleXMLElement($response->getBody()); |
142 | 142 | } |
@@ -71,21 +71,18 @@ |
||
71 | 71 | 'timeout' => 30, |
72 | 72 | 'connection_timeout' => 5, |
73 | 73 | ]); |
74 | - } |
|
75 | - else if($http_client instanceof Client) |
|
74 | + } else if($http_client instanceof Client) |
|
76 | 75 | { |
77 | 76 | $application_url_client = $http_client->getConfig('base_uri'); |
78 | 77 | |
79 | 78 | if(!isset($application_url_client)) |
80 | 79 | { |
81 | 80 | $http_client->setDefaultOption('base_uri', $application_url); |
82 | - } |
|
83 | - else if($application_url_client != $application_url) |
|
81 | + } else if($application_url_client != $application_url) |
|
84 | 82 | { |
85 | 83 | throw new InvalidParameterException("http_client parameter has a differente url to application_url parameter"); |
86 | 84 | } |
87 | - } |
|
88 | - else |
|
85 | + } else |
|
89 | 86 | { |
90 | 87 | throw new InvalidParameterException("http_client parameter must be a GuzzleHttp\Client object or empty"); |
91 | 88 | } |
@@ -197,7 +197,7 @@ |
||
197 | 197 | { |
198 | 198 | $args = func_get_args(); |
199 | 199 | |
200 | - if(count($args) > 0) |
|
200 | + if (count($args) > 0) |
|
201 | 201 | { |
202 | 202 | $this->query['exclude_place_ids'] = implode(', ', $args); |
203 | 203 |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | */ |
53 | 53 | public function __construct(array $query = []) |
54 | 54 | { |
55 | - if(!isset($query['format'])) |
|
55 | + if (!isset($query['format'])) |
|
56 | 56 | { |
57 | 57 | //Default format |
58 | 58 | $query['format'] = 'json'; |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | { |
78 | 78 | $format = strtolower($format); |
79 | 79 | |
80 | - if(in_array($format, $this->accepteFormat)) |
|
80 | + if (in_array($format, $this->accepteFormat)) |
|
81 | 81 | { |
82 | 82 | $this->setFormat($format); |
83 | 83 | |
@@ -144,9 +144,9 @@ discard block |
||
144 | 144 | */ |
145 | 145 | public function polygon($polygon) |
146 | 146 | { |
147 | - if(in_array($polygon, $this->polygon)) |
|
147 | + if (in_array($polygon, $this->polygon)) |
|
148 | 148 | { |
149 | - $this->query['polygon_'.$polygon] = "1"; |
|
149 | + $this->query['polygon_' . $polygon] = "1"; |
|
150 | 150 | |
151 | 151 | return $this; |
152 | 152 | } |
@@ -48,7 +48,7 @@ |
||
48 | 48 | */ |
49 | 49 | public function osmType($type) |
50 | 50 | { |
51 | - if(in_array($type, $this->osmType)) |
|
51 | + if (in_array($type, $this->osmType)) |
|
52 | 52 | { |
53 | 53 | $this->query['osm_type'] = $type; |
54 | 54 |