Completed
Push — master ( 95e37c...1f9e9c )
by
unknown
03:55
created
src/Geo6/Poi.php 1 patch
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
      */
71 71
     public function setCity($city)
72 72
     {
73
-        $this->city = (string)$city;
73
+        $this->city = (string) $city;
74 74
     }
75 75
 
76 76
     /**
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
      */
120 120
     public function addHour($index, Day $day)
121 121
     {
122
-        $this->hours[(int)$index] = $day;
122
+        $this->hours[(int) $index] = $day;
123 123
     }
124 124
 
125 125
     /**
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
      */
144 144
     public function setId($id)
145 145
     {
146
-        $this->id = (string)$id;
146
+        $this->id = (string) $id;
147 147
     }
148 148
 
149 149
     /**
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
      */
160 160
     public function setLatitude($latitude)
161 161
     {
162
-        $this->latitude = (float)$latitude;
162
+        $this->latitude = (float) $latitude;
163 163
     }
164 164
 
165 165
     /**
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
      */
176 176
     public function setLongitude($longitude)
177 177
     {
178
-        $this->longitude = (float)$longitude;
178
+        $this->longitude = (float) $longitude;
179 179
     }
180 180
 
181 181
     /**
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
      */
192 192
     public function setNote($note)
193 193
     {
194
-        $this->note = (string)$note;
194
+        $this->note = (string) $note;
195 195
     }
196 196
 
197 197
     /**
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
      */
208 208
     public function setNr($nr)
209 209
     {
210
-        $this->nr = (string)$nr;
210
+        $this->nr = (string) $nr;
211 211
     }
212 212
 
213 213
     /**
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
      */
224 224
     public function setOffice($office)
225 225
     {
226
-        $this->office = (string)$office;
226
+        $this->office = (string) $office;
227 227
     }
228 228
 
229 229
     /**
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
      */
264 264
     public function setStreet($street)
265 265
     {
266
-        $this->street = (string)$street;
266
+        $this->street = (string) $street;
267 267
     }
268 268
 
269 269
     /**
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
      */
280 280
     public function setType($type)
281 281
     {
282
-        $this->type = (string)$type;
282
+        $this->type = (string) $type;
283 283
     }
284 284
 
285 285
     /**
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
      */
296 296
     public function setX($x)
297 297
     {
298
-        $this->x = (int)$x;
298
+        $this->x = (int) $x;
299 299
     }
300 300
 
301 301
     /**
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
      */
312 312
     public function setY($y)
313 313
     {
314
-        $this->y = (int)$y;
314
+        $this->y = (int) $y;
315 315
     }
316 316
 
317 317
     /**
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
327 327
      */
328 328
     public function setZip($zip)
329 329
     {
330
-        $this->zip = (string)$zip;
330
+        $this->zip = (string) $zip;
331 331
     }
332 332
 
333 333
     /**
@@ -351,7 +351,7 @@  discard block
 block discarded – undo
351 351
      */
352 352
     public function setPage($page)
353 353
     {
354
-        $this->page = (string)$page;
354
+        $this->page = (string) $page;
355 355
     }
356 356
 
357 357
 
@@ -373,55 +373,55 @@  discard block
 block discarded – undo
373 373
         $poi = new Poi();
374 374
 
375 375
         if (isset($recordXml->Id) && $recordXml->Id != '') {
376
-            $poi->setId((string)$recordXml->Id);
376
+            $poi->setId((string) $recordXml->Id);
377 377
         }
378 378
         if (isset($recordXml->ID) && $recordXml->ID != '') {
379
-            $poi->setId((string)$recordXml->ID);
379
+            $poi->setId((string) $recordXml->ID);
380 380
         }
381 381
         if (isset($recordXml->Type) && $recordXml->Type != '') {
382
-            $poi->setType((string)$recordXml->Type);
382
+            $poi->setType((string) $recordXml->Type);
383 383
         }
384 384
         if (isset($recordXml->Name) && $recordXml->Name != '') {
385
-            $poi->setOffice((string)$recordXml->Name);
385
+            $poi->setOffice((string) $recordXml->Name);
386 386
         }
387 387
         if (isset($recordXml->OFFICE) && $recordXml->OFFICE != '') {
388
-            $poi->setOffice((string)$recordXml->OFFICE);
388
+            $poi->setOffice((string) $recordXml->OFFICE);
389 389
         }
390 390
         if (isset($recordXml->Street) && $recordXml->Street != '') {
391
-            $poi->setStreet((string)$recordXml->Street);
391
+            $poi->setStreet((string) $recordXml->Street);
392 392
         }
393 393
         if (isset($recordXml->STREET) && $recordXml->STREET != '') {
394
-            $poi->setStreet((string)$recordXml->STREET);
394
+            $poi->setStreet((string) $recordXml->STREET);
395 395
         }
396 396
         if (isset($recordXml->Number) && $recordXml->Number != '') {
397
-            $poi->setNr((string)$recordXml->Number);
397
+            $poi->setNr((string) $recordXml->Number);
398 398
         }
399 399
         if (isset($recordXml->NR) && $recordXml->NR != '') {
400
-            $poi->setNr((string)$recordXml->NR);
400
+            $poi->setNr((string) $recordXml->NR);
401 401
         }
402 402
         if (isset($recordXml->Zip) && $recordXml->Zip != '') {
403
-            $poi->setZip((string)$recordXml->Zip);
403
+            $poi->setZip((string) $recordXml->Zip);
404 404
         }
405 405
         if (isset($recordXml->ZIP) && $recordXml->ZIP != '') {
406
-            $poi->setZip((string)$recordXml->ZIP);
406
+            $poi->setZip((string) $recordXml->ZIP);
407 407
         }
408 408
         if (isset($recordXml->City) && $recordXml->City != '') {
409
-            $poi->setCity((string)$recordXml->City);
409
+            $poi->setCity((string) $recordXml->City);
410 410
         }
411 411
         if (isset($recordXml->CITY) && $recordXml->CITY != '') {
412
-            $poi->setCity((string)$recordXml->CITY);
412
+            $poi->setCity((string) $recordXml->CITY);
413 413
         }
414 414
         if (isset($recordXml->X) && $recordXml->X != '') {
415
-            $poi->setX((int)$recordXml->X);
415
+            $poi->setX((int) $recordXml->X);
416 416
         }
417 417
         if (isset($recordXml->Y) && $recordXml->Y != '') {
418
-            $poi->setY((int)$recordXml->Y);
418
+            $poi->setY((int) $recordXml->Y);
419 419
         }
420 420
         if (isset($recordXml->Longitude) && $recordXml->Longitude != '') {
421
-            $poi->setLongitude((float)$recordXml->Longitude);
421
+            $poi->setLongitude((float) $recordXml->Longitude);
422 422
         }
423 423
         if (isset($recordXml->Latitude) && $recordXml->Latitude != '') {
424
-            $poi->setLatitude((float)$recordXml->Latitude);
424
+            $poi->setLatitude((float) $recordXml->Latitude);
425 425
         }
426 426
         if (isset($recordXml->Services) && isset($recordXml->Services->Service)) {
427 427
             foreach ($recordXml->Services->Service as $service) {
@@ -456,13 +456,13 @@  discard block
 block discarded – undo
456 456
         }
457 457
 
458 458
         if (isset($recordXml->ClosedFrom) && $recordXml->ClosedFrom != '') {
459
-            $poi->setClosedFrom((string)$recordXml->ClosedFrom);
459
+            $poi->setClosedFrom((string) $recordXml->ClosedFrom);
460 460
         }
461 461
         if (isset($recordXml->ClosedTo) && $recordXml->ClosedTo != '') {
462
-            $poi->setClosedTo((string)$recordXml->ClosedTo);
462
+            $poi->setClosedTo((string) $recordXml->ClosedTo);
463 463
         }
464 464
         if (isset($recordXml->NOTE) && $recordXml->NOTE != '') {
465
-            $poi->setNote((string)$recordXml->NOTE);
465
+            $poi->setNote((string) $recordXml->NOTE);
466 466
         }
467 467
 
468 468
         if (isset($xml->Page) && isset($xml->Page['ServiceRef']) && $xml->Page['ServiceRef'] != '') {
Please login to merge, or discard this patch.
src/ApiCaller/ApiCaller.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -122,6 +122,6 @@
 block discarded – undo
122 122
      */
123 123
     public function getHttpCodeType()
124 124
     {
125
-        return 100 * (int)($this->responseHttpCode / 100);
125
+        return 100 * (int) ($this->responseHttpCode / 100);
126 126
     }
127 127
 }
Please login to merge, or discard this patch.
src/Geo6.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -66,8 +66,8 @@  discard block
 block discarded – undo
66 66
      */
67 67
     public function __construct($partner, $appId)
68 68
     {
69
-        $this->setPartner((string)$partner);
70
-        $this->setAppId((string)$appId);
69
+        $this->setPartner((string) $partner);
70
+        $this->setAppId((string) $appId);
71 71
     }
72 72
 
73 73
     /**
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
             CURLOPT_SSL_VERIFYPEER => false,
139 139
             CURLOPT_SSL_VERIFYHOST => false,
140 140
             CURLOPT_RETURNTRANSFER => true,
141
-            CURLOPT_TIMEOUT => (int)$this->getTimeOut(),
141
+            CURLOPT_TIMEOUT => (int) $this->getTimeOut(),
142 142
 
143 143
             CURLOPT_POST => true,
144 144
             CURLOPT_POSTFIELDS => $this->buildParameters($method, $parameters),
@@ -155,8 +155,8 @@  discard block
 block discarded – undo
155 155
         }
156 156
 
157 157
         // catch generic errors
158
-        if (isset($xml['type']) && (string)$xml['type'] == 'TaxipostLocatorError') {
159
-            throw new BpostTaxipostLocatorException((string)$xml->txt, (int)$xml->status);
158
+        if (isset($xml['type']) && (string) $xml['type'] == 'TaxipostLocatorError') {
159
+            throw new BpostTaxipostLocatorException((string) $xml->txt, (int) $xml->status);
160 160
         }
161 161
 
162 162
         // return
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
      */
204 204
     public function setTimeOut($seconds)
205 205
     {
206
-        $this->timeOut = (int)$seconds;
206
+        $this->timeOut = (int) $seconds;
207 207
     }
208 208
 
209 209
     /**
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
      */
214 214
     public function getTimeOut()
215 215
     {
216
-        return (int)$this->timeOut;
216
+        return (int) $this->timeOut;
217 217
     }
218 218
 
219 219
     /**
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
      */
226 226
     public function getUserAgent()
227 227
     {
228
-        return (string)'PHP Bpost Geo6/' . self::VERSION . ' ' . $this->userAgent;
228
+        return (string) 'PHP Bpost Geo6/' . self::VERSION . ' ' . $this->userAgent;
229 229
     }
230 230
 
231 231
     /**
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
      */
237 237
     public function setUserAgent($userAgent)
238 238
     {
239
-        $this->userAgent = (string)$userAgent;
239
+        $this->userAgent = (string) $userAgent;
240 240
     }
241 241
 
242 242
     // webservice methods
@@ -262,12 +262,12 @@  discard block
 block discarded – undo
262 262
     public function getNearestServicePoint($street, $number, $zone, $language = 'nl', $type = 3, $limit = 10)
263 263
     {
264 264
         $parameters = array(
265
-            'Street' => (string)$street,
266
-            'Number' => (string)$number,
267
-            'Zone' => (string)$zone,
268
-            'Language' => (string)$language,
269
-            'Type' => (int)$type,
270
-            'Limit' => (int)$limit
265
+            'Street' => (string) $street,
266
+            'Number' => (string) $number,
267
+            'Zone' => (string) $zone,
268
+            'Language' => (string) $language,
269
+            'Type' => (int) $type,
270
+            'Limit' => (int) $limit
271 271
         );
272 272
 
273 273
         $xml = $this->doCall('search', $parameters);
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
         foreach ($xml->PoiList->Poi as $poi) {
281 281
             $pois[] = array(
282 282
                 'poi' => Poi::createFromXML($poi),
283
-                'distance' => (float)$poi->Distance,
283
+                'distance' => (float) $poi->Distance,
284 284
             );
285 285
         }
286 286
 
@@ -306,9 +306,9 @@  discard block
 block discarded – undo
306 306
     public function getServicePointDetails($id, $language = 'nl', $type = 3)
307 307
     {
308 308
         $parameters = array(
309
-            'Id' => (string)$id,
310
-            'Language' => (string)$language,
311
-            'Type' => (int)$type,
309
+            'Id' => (string) $id,
310
+            'Language' => (string) $language,
311
+            'Type' => (int) $type,
312 312
         );
313 313
 
314 314
         $xml = $this->doCall('info', $parameters);
@@ -331,9 +331,9 @@  discard block
 block discarded – undo
331 331
     public function getServicePointPageUrl($id, $language = 'nl', $type = 3)
332 332
     {
333 333
         $parameters = array(
334
-            'Id' => (string)$id,
335
-            'Language' => (string)$language,
336
-            'Type' => (int)$type,
334
+            'Id' => (string) $id,
335
+            'Language' => (string) $language,
336
+            'Type' => (int) $type,
337 337
         );
338 338
 
339 339
         return $this->buildUrl('page', $parameters);
Please login to merge, or discard this patch.