@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | 'rqtype' => $requestType, |
| 130 | 130 | 'path' => $this->path, |
| 131 | 131 | 'proto' => $this->protocol, |
| 132 | - 'query' => (strlen($this->queryString) ? '?' . $this->queryString : '') |
|
| 132 | + 'query' => (strlen($this->queryString) ? '?'.$this->queryString : '') |
|
| 133 | 133 | )); |
| 134 | 134 | |
| 135 | 135 | // Add the host part |
@@ -184,7 +184,7 @@ discard block |
||
| 184 | 184 | $numBytes = 1; |
| 185 | 185 | $start = time(); |
| 186 | 186 | while (true) { |
| 187 | - if (! $this->checkConnection($start)) { |
|
| 187 | + if (!$this->checkConnection($start)) { |
|
| 188 | 188 | continue; |
| 189 | 189 | } |
| 190 | 190 | |
@@ -197,7 +197,7 @@ discard block |
||
| 197 | 197 | $start = time(); // we have readen something => adjust timeout start point |
| 198 | 198 | $tmp .= $c; |
| 199 | 199 | |
| 200 | - if (! $delimiterFound) { |
|
| 200 | + if (!$delimiterFound) { |
|
| 201 | 201 | $this->handleHeader($delimiterFound, $numBytes, $tmp); |
| 202 | 202 | } |
| 203 | 203 | |
@@ -305,7 +305,7 @@ discard block |
||
| 305 | 305 | |
| 306 | 306 | $ms = $this->appendPayloadToRequest($ms); |
| 307 | 307 | |
| 308 | - if (! $this->isConnected()) { |
|
| 308 | + if (!$this->isConnected()) { |
|
| 309 | 309 | $this->connect(); |
| 310 | 310 | } |
| 311 | 311 | |
@@ -330,7 +330,7 @@ discard block |
||
| 330 | 330 | */ |
| 331 | 331 | private function checkConnection($start): bool |
| 332 | 332 | { |
| 333 | - if (! $this->ready()) { |
|
| 333 | + if (!$this->ready()) { |
|
| 334 | 334 | if (time() - $start > $this->timeout) { |
| 335 | 335 | $this->disconnect(); |
| 336 | 336 | throw new HttpException("Connection timed out!"); |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | */ |
| 40 | 40 | public static function hasElement($array, $element): bool |
| 41 | 41 | { |
| 42 | - if (! is_array($array)) { |
|
| 42 | + if (!is_array($array)) { |
|
| 43 | 43 | return false; |
| 44 | 44 | } |
| 45 | 45 | |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | */ |
| 61 | 61 | public function read($length = 1, $offset = null): string |
| 62 | 62 | { |
| 63 | - return stream_get_contents($this->handle, $length, $offset === null ? - 1 : intval($offset)); |
|
| 63 | + return stream_get_contents($this->handle, $length, $offset === null ? -1 : intval($offset)); |
|
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | /** |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | */ |
| 71 | 71 | public function isOpen(): bool |
| 72 | 72 | { |
| 73 | - return is_resource($this->handle) && ! feof($this->handle); |
|
| 73 | + return is_resource($this->handle) && !feof($this->handle); |
|
| 74 | 74 | } |
| 75 | 75 | |
| 76 | 76 | /** |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | */ |
| 91 | 91 | public function ready(): bool |
| 92 | 92 | { |
| 93 | - if (! is_resource($this->handle)) { |
|
| 93 | + if (!is_resource($this->handle)) { |
|
| 94 | 94 | return false; |
| 95 | 95 | } |
| 96 | 96 | |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | return false; |
| 111 | 111 | } |
| 112 | 112 | |
| 113 | - if (! in_array($this->handle, $read)) { |
|
| 113 | + if (!in_array($this->handle, $read)) { |
|
| 114 | 114 | return false; |
| 115 | 115 | } |
| 116 | 116 | |
@@ -193,7 +193,7 @@ discard block |
||
| 193 | 193 | */ |
| 194 | 194 | public function isWriteable(): bool |
| 195 | 195 | { |
| 196 | - if (! is_resource($this->handle)) { |
|
| 196 | + if (!is_resource($this->handle)) { |
|
| 197 | 197 | return false; |
| 198 | 198 | } |
| 199 | 199 | |
@@ -213,7 +213,7 @@ discard block |
||
| 213 | 213 | return false; |
| 214 | 214 | } |
| 215 | 215 | |
| 216 | - if (! in_array($this->handle, $write)) { |
|
| 216 | + if (!in_array($this->handle, $write)) { |
|
| 217 | 217 | return false; |
| 218 | 218 | } |
| 219 | 219 | |