@@ -75,23 +75,23 @@ public function __construct(string $key, string $secret)
7575 */
7676 public function internationalAutocomplete (string $ context , string $ term , ?string $ session = null , $ language ="" ): array
7777 {
78- return $ this ->performApiCall ('international/v1/autocomplete/ ' . rawurlencode ($ context ) . '/ ' . rawurlencode ($ term ) . '/ ' . rawurlencode ($ language ), $ session ?? $ this ->generateSessionString ());
78+ return $ this ->_performApiCall ('international/v1/autocomplete/ ' . rawurlencode ($ context ) . '/ ' . rawurlencode ($ term ) . '/ ' . rawurlencode ($ language ), $ session ?? $ this ->_generateSessionString ());
7979 }
8080
8181 /**
8282 * @see https://api.postcode.nl/documentation/international/v1/Autocomplete/getDetails
8383 */
8484 public function internationalGetDetails (string $ context , ?string $ session = null ): array
8585 {
86- return $ this ->performApiCall ('international/v1/address/ ' . rawurlencode ($ context ), $ session ?? $ this ->generateSessionString ());
86+ return $ this ->_performApiCall ('international/v1/address/ ' . rawurlencode ($ context ), $ session ?? $ this ->_generateSessionString ());
8787 }
8888
8989 /**
9090 * @see https://api.postcode.nl/documentation/international/v1/Autocomplete/getSupportedCountries
9191 */
9292 public function internationalGetSupportedCountries (): array
9393 {
94- return $ this ->performApiCall ('international/v1/supported-countries ' , null );
94+ return $ this ->_performApiCall ('international/v1/supported-countries ' , null );
9595 }
9696
9797 /**
@@ -123,12 +123,12 @@ public function dutchAddressByPostcode(string $postcode, int $houseNumber, ?stri
123123 {
124124 $ urlParts [] = rawurlencode ($ houseNumberAddition );
125125 }
126- return $ this ->performApiCall (implode ('/ ' , $ urlParts ), null );
126+ return $ this ->_performApiCall (implode ('/ ' , $ urlParts ), null );
127127 }
128128
129129 public function accountInfo (): array
130130 {
131- return $ this ->performApiCall ('account/v1/info ' , null );
131+ return $ this ->_performApiCall ('account/v1/info ' , null );
132132 }
133133
134134 /**
@@ -155,12 +155,12 @@ public function __destruct()
155155 curl_close ($ this ->_curlHandler );
156156 }
157157
158- protected function generateSessionString (): string
158+ protected function _generateSessionString (): string
159159 {
160160 return bin2hex (random_bytes (8 ));
161161 }
162162
163- protected function performApiCall (string $ path , ?string $ session ): array
163+ protected function _performApiCall (string $ path , ?string $ session ): array
164164 {
165165 $ url = static ::SERVER_URL . $ path ;
166166 curl_setopt ($ this ->_curlHandler , CURLOPT_URL , $ url );
0 commit comments