@@ -22,9 +22,9 @@ discard block |
||
| 22 | 22 | { |
| 23 | 23 | use Traits_Optionable; |
| 24 | 24 | |
| 25 | - /** |
|
| 26 | - * @var URLInfo |
|
| 27 | - */ |
|
| 25 | + /** |
|
| 26 | + * @var URLInfo |
|
| 27 | + */ |
|
| 28 | 28 | private $url; |
| 29 | 29 | |
| 30 | 30 | public function __construct(URLInfo $url) |
@@ -41,13 +41,13 @@ discard block |
||
| 41 | 41 | ); |
| 42 | 42 | } |
| 43 | 43 | |
| 44 | - /** |
|
| 45 | - * Whether to verify the host's SSL certificate, in |
|
| 46 | - * case of an https connection. |
|
| 47 | - * |
|
| 48 | - * @param bool $verifySSL |
|
| 49 | - * @return URLInfo_ConnectionTester |
|
| 50 | - */ |
|
| 44 | + /** |
|
| 45 | + * Whether to verify the host's SSL certificate, in |
|
| 46 | + * case of an https connection. |
|
| 47 | + * |
|
| 48 | + * @param bool $verifySSL |
|
| 49 | + * @return URLInfo_ConnectionTester |
|
| 50 | + */ |
|
| 51 | 51 | public function setVerifySSL(bool $verifySSL=true) : URLInfo_ConnectionTester |
| 52 | 52 | { |
| 53 | 53 | $this->setOption('verify-ssl', $verifySSL); |
@@ -81,12 +81,12 @@ discard block |
||
| 81 | 81 | return $this->getIntOption('timeout'); |
| 82 | 82 | } |
| 83 | 83 | |
| 84 | - /** |
|
| 85 | - * Initializes the CURL instance. |
|
| 86 | - * |
|
| 87 | - * @throws BaseException |
|
| 88 | - * @return resource |
|
| 89 | - */ |
|
| 84 | + /** |
|
| 85 | + * Initializes the CURL instance. |
|
| 86 | + * |
|
| 87 | + * @throws BaseException |
|
| 88 | + * @return resource |
|
| 89 | + */ |
|
| 90 | 90 | private function initCURL() |
| 91 | 91 | { |
| 92 | 92 | requireCURL(); |
@@ -105,9 +105,9 @@ discard block |
||
| 105 | 105 | return $ch; |
| 106 | 106 | } |
| 107 | 107 | |
| 108 | - /** |
|
| 109 | - * @param resource $ch |
|
| 110 | - */ |
|
| 108 | + /** |
|
| 109 | + * @param resource $ch |
|
| 110 | + */ |
|
| 111 | 111 | private function configureOptions($ch) : void |
| 112 | 112 | { |
| 113 | 113 | if($this->isVerboseModeEnabled()) |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | * @param bool $verifySSL |
| 49 | 49 | * @return URLInfo_ConnectionTester |
| 50 | 50 | */ |
| 51 | - public function setVerifySSL(bool $verifySSL=true) : URLInfo_ConnectionTester |
|
| 51 | + public function setVerifySSL(bool $verifySSL = true) : URLInfo_ConnectionTester |
|
| 52 | 52 | { |
| 53 | 53 | $this->setOption('verify-ssl', $verifySSL); |
| 54 | 54 | return $this; |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | return $this->getBoolOption('verify-ssl'); |
| 60 | 60 | } |
| 61 | 61 | |
| 62 | - public function setVerboseMode(bool $enabled=true) : URLInfo_ConnectionTester |
|
| 62 | + public function setVerboseMode(bool $enabled = true) : URLInfo_ConnectionTester |
|
| 63 | 63 | { |
| 64 | 64 | $this->setOption('curl-verbose', $enabled); |
| 65 | 65 | return $this; |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | |
| 94 | 94 | $ch = curl_init(); |
| 95 | 95 | |
| 96 | - if(!is_resource($ch)) |
|
| 96 | + if (!is_resource($ch)) |
|
| 97 | 97 | { |
| 98 | 98 | throw new BaseException( |
| 99 | 99 | 'Could not initialize a new cURL instance.', |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | */ |
| 111 | 111 | private function configureOptions($ch) : void |
| 112 | 112 | { |
| 113 | - if($this->isVerboseModeEnabled()) |
|
| 113 | + if ($this->isVerboseModeEnabled()) |
|
| 114 | 114 | { |
| 115 | 115 | curl_setopt($ch, CURLOPT_VERBOSE, true); |
| 116 | 116 | } |
@@ -120,13 +120,13 @@ discard block |
||
| 120 | 120 | curl_setopt($ch, CURLOPT_TIMEOUT, $this->getTimeout()); |
| 121 | 121 | curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); |
| 122 | 122 | |
| 123 | - if(!$this->isVerifySSLEnabled()) |
|
| 123 | + if (!$this->isVerifySSLEnabled()) |
|
| 124 | 124 | { |
| 125 | 125 | curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); |
| 126 | 126 | curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); |
| 127 | 127 | } |
| 128 | 128 | |
| 129 | - if($this->url->hasUsername()) |
|
| 129 | + if ($this->url->hasUsername()) |
|
| 130 | 130 | { |
| 131 | 131 | curl_setopt($ch, CURLOPT_USERNAME, $this->url->getUsername()); |
| 132 | 132 | curl_setopt($ch, CURLOPT_PASSWORD, $this->url->getPassword()); |