@@ -94,7 +94,8 @@ function __construct($argv)
9494 *
9595 * @return bool
9696 */
97- function isCFTokenValid () {
97+ function isCFTokenValid ()
98+ {
9899 $ res = $ this ->callCFapi ("GET " , "client/v4/user/tokens/verify " );
99100 if ($ res ['success ' ]) {
100101 return true ;
@@ -118,7 +119,7 @@ function makeUpdateDNS()
118119 $ json = $ this ->callCFapi ("PATCH " , "client/v4/zones/ $ {zoneId}/dns_records/ $ {recordId}" , $ dnsRecord );
119120
120121 if (!$ json ['success ' ]) {
121- echo Output::BAD_HTTP_REQUEST
122+ echo Output::BAD_HTTP_REQUEST ;
122123 exit ();
123124 }
124125 }
@@ -128,7 +129,7 @@ function makeUpdateDNS()
128129
129130 function badParam ($ msg = '' )
130131 {
131- echo (strlen ($ msg ) > 0 ) ? $ msg : echo Output::BAD_PARAMS ;
132+ echo (strlen ($ msg ) > 0 ) ? $ msg : Output::BAD_PARAMS ;
132133 exit ();
133134 }
134135
@@ -207,7 +208,8 @@ function setZones()
207208 * Find hostname for full domain name
208209 * example: domain.com.uk --> vpn.domain.com.uk
209210 */
210- function isZonesContainFullname ($ arZones , $ fullname ){
211+ function isZonesContainFullname ($ arZones , $ fullname )
212+ {
211213 $ res = [];
212214 foreach ($ arZones as $ arZone ) {
213215 if (strpos ($ fullname , $ arZone ['hostname ' ]) !== false ) {
@@ -255,7 +257,8 @@ function setRecord($arHostData, string $ip, $type)
255257 /**
256258 * Call CloudFlare v4 API @link https://api.cloudflare.com/#getting-started-endpoints
257259 */
258- function callCFapi ($ method , $ path , $ data = []) {
260+ function callCFapi ($ method , $ path , $ data = [])
261+ {
259262 $ options = [
260263 CURLOPT_URL => self ::API_URL . '/ ' . $ path ,
261264 CURLOPT_HTTPHEADER => ["Authorization: Bearer $ this ->apiKey " , "Content-Type: application/json " ],
0 commit comments