From 665fed93e21212146d21b4dfa6b6e8b53efc616f Mon Sep 17 00:00:00 2001 From: malle-pietje Date: Mon, 22 Mar 2021 11:58:20 +0100 Subject: [PATCH] shortened several property names --- src/Client.php | 58 +++++++++++++++++++++++++------------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/src/Client.php b/src/Client.php index 636ff4e..73d86b7 100755 --- a/src/Client.php +++ b/src/Client.php @@ -22,25 +22,25 @@ class Client /** * private and protected properties */ - private $class_version = '1.1.70'; - protected $baseurl = 'https://127.0.0.1:8443'; - protected $user = ''; - protected $password = ''; - protected $site = 'default'; - protected $version = '6.0.43'; - protected $debug = false; - protected $curl_ssl_verify_peer = false; - protected $curl_ssl_verify_host = false; - protected $is_loggedin = false; - protected $is_unifi_os = false; - protected $exec_retries = 0; - protected $cookies = ''; - protected $headers = []; - protected $method = 'GET'; - protected $methods_allowed = ['GET', 'POST', 'PUT', 'DELETE', 'PATCH']; - protected $connect_timeout = 10; - protected $last_results_raw = null; - protected $last_error_message = null; + private $class_version = '1.1.70'; + protected $baseurl = 'https://127.0.0.1:8443'; + protected $user = ''; + protected $password = ''; + protected $site = 'default'; + protected $version = '6.0.43'; + protected $debug = false; + protected $ssl_verify_peer = false; + protected $ssl_verify_host = false; + protected $is_loggedin = false; + protected $is_unifi_os = false; + protected $exec_retries = 0; + protected $cookies = ''; + protected $headers = []; + protected $method = 'GET'; + protected $methods_allowed = ['GET', 'POST', 'PUT', 'DELETE', 'PATCH']; + protected $connect_timeout = 10; + protected $last_results_raw = null; + protected $last_error_message = null; /** * Construct an instance of the UniFi API client class @@ -80,8 +80,8 @@ public function __construct($user, $password, $baseurl = '', $site = '', $versio } if ((boolean) $ssl_verify === true) { - $this->curl_ssl_verify_peer = true; - $this->curl_ssl_verify_host = 2; + $this->ssl_verify_peer = true; + $this->ssl_verify_host = 2; } } @@ -3409,11 +3409,11 @@ public function set_method($method) * * https://curl.haxx.se/libcurl/c/CURLOPT_SSL_VERIFYPEER.html * - * @return bool value of private property $curl_ssl_verify_peer (cURL option CURLOPT_SSL_VERIFYPEER) + * @return bool value of private property $ssl_verify_peer (cURL option CURLOPT_SSL_VERIFYPEER) */ public function get_ssl_verify_peer() { - return $this->curl_ssl_verify_peer; + return $this->ssl_verify_peer; } /** @@ -3429,7 +3429,7 @@ public function set_ssl_verify_peer($ssl_verify_peer) return false; } - $this->curl_ssl_verify_peer = $ssl_verify_peer; + $this->ssl_verify_peer = $ssl_verify_peer; return true; } @@ -3439,11 +3439,11 @@ public function set_ssl_verify_peer($ssl_verify_peer) * * https://curl.haxx.se/libcurl/c/CURLOPT_SSL_VERIFYHOST.html * - * @return bool value of private property $curl_ssl_verify_peer (cURL option CURLOPT_SSL_VERIFYHOST) + * @return bool value of private property $ssl_verify_peer (cURL option CURLOPT_SSL_VERIFYHOST) */ public function get_ssl_verify_host() { - return $this->curl_ssl_verify_host; + return $this->ssl_verify_host; } /** @@ -3459,7 +3459,7 @@ public function set_ssl_verify_host($ssl_verify_host) return false; } - $this->curl_ssl_verify_host = $ssl_verify_host; + $this->ssl_verify_host = $ssl_verify_host; return true; } @@ -3956,8 +3956,8 @@ protected function get_curl_resource() if (is_object($ch) || is_resource($ch)) { $curl_options = [ CURLOPT_PROTOCOLS => CURLPROTO_HTTPS | CURLPROTO_HTTP, - CURLOPT_SSL_VERIFYPEER => $this->curl_ssl_verify_peer, - CURLOPT_SSL_VERIFYHOST => $this->curl_ssl_verify_host, + CURLOPT_SSL_VERIFYPEER => $this->ssl_verify_peer, + CURLOPT_SSL_VERIFYHOST => $this->ssl_verify_host, CURLOPT_CONNECTTIMEOUT => $this->connect_timeout, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '',