wp/wp-includes/Requests/Proxy/HTTP.php
changeset 18 be944660c56a
parent 7 cf61fcea0001
--- a/wp/wp-includes/Requests/Proxy/HTTP.php	Tue Dec 15 15:52:01 2020 +0100
+++ b/wp/wp-includes/Requests/Proxy/HTTP.php	Wed Sep 21 18:19:35 2022 +0200
@@ -59,12 +59,12 @@
 			$this->proxy = $args;
 		}
 		elseif (is_array($args)) {
-			if (count($args) == 1) {
+			if (count($args) === 1) {
 				list($this->proxy) = $args;
 			}
-			elseif (count($args) == 3) {
+			elseif (count($args) === 3) {
 				list($this->proxy, $this->user, $this->pass) = $args;
-				$this->use_authentication = true;
+				$this->use_authentication                    = true;
 			}
 			else {
 				throw new Requests_Exception('Invalid number of arguments', 'proxyhttpbadargs');
@@ -82,13 +82,13 @@
 	 * @see fsockopen_header
 	 * @param Requests_Hooks $hooks Hook system
 	 */
-	public function register(Requests_Hooks &$hooks) {
-		$hooks->register('curl.before_send', array(&$this, 'curl_before_send'));
+	public function register(Requests_Hooks $hooks) {
+		$hooks->register('curl.before_send', array($this, 'curl_before_send'));
 
-		$hooks->register('fsockopen.remote_socket', array(&$this, 'fsockopen_remote_socket'));
-		$hooks->register('fsockopen.remote_host_path', array(&$this, 'fsockopen_remote_host_path'));
+		$hooks->register('fsockopen.remote_socket', array($this, 'fsockopen_remote_socket'));
+		$hooks->register('fsockopen.remote_host_path', array($this, 'fsockopen_remote_host_path'));
 		if ($this->use_authentication) {
-			$hooks->register('fsockopen.after_headers', array(&$this, 'fsockopen_header'));
+			$hooks->register('fsockopen.after_headers', array($this, 'fsockopen_header'));
 		}
 	}
 
@@ -148,4 +148,4 @@
 	public function get_auth_string() {
 		return $this->user . ':' . $this->pass;
 	}
-}
\ No newline at end of file
+}