Skip to content

Commit e6568aa

Browse files
authored
Update PostcodeClient.php
1 parent 5761e57 commit e6568aa

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Client/PostcodeClient.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,12 @@ public function fetchAddress($zipCode, $houseNumber)
4848
$uri = sprintf("http://json.api-postcode.nl?postcode=%s&number=%s", $zipCode, $houseNumber);
4949
$curl = curl_init();
5050

51-
curl_setopt($curl, CURLOPT_URL,$uri);
51+
curl_setopt($curl, CURLOPT_URL, $uri);
5252
curl_setopt($curl, CURLOPT_POST, 1);
5353
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
54-
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers = [sprintf('Token: %s', $this->token)]);
54+
curl_setopt($curl, CURLOPT_HTTPHEADER, [sprintf('Token: %s', $this->token)]);
5555

56-
$server_output = curl_exec ($curl);
56+
$serverOutput = curl_exec($curl);
5757
$httpCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
5858

5959
if ($httpCode !== 200) {
@@ -62,7 +62,7 @@ public function fetchAddress($zipCode, $houseNumber)
6262

6363
curl_close($curl);
6464

65-
$responseData = json_decode($server_output, true);
65+
$responseData = json_decode($serverOutput, true);
6666

6767
$address = new Address(
6868
$responseData['street'],

0 commit comments

Comments
 (0)