@@ -60,7 +60,7 @@ |
||
| 60 | 60 | */ |
| 61 | 61 | public function get($key) |
| 62 | 62 | { |
| 63 | - if (! isset($_SESSION[$key])) { |
|
| 63 | + if (!isset($_SESSION[$key])) { |
|
| 64 | 64 | return null; |
| 65 | 65 | } |
| 66 | 66 | |
@@ -22,7 +22,8 @@ |
||
| 22 | 22 | * Create a new session provider |
| 23 | 23 | */ |
| 24 | 24 | public function __construct() |
| 25 | - {} |
|
| 25 | + { |
|
| 26 | +} |
|
| 26 | 27 | |
| 27 | 28 | /** |
| 28 | 29 | * Create session |
@@ -196,7 +196,7 @@ discard block |
||
| 196 | 196 | |
| 197 | 197 | $ms = $this->appendPayloadToRequest($ms); |
| 198 | 198 | |
| 199 | - if (! $this->isConnected()) { |
|
| 199 | + if (!$this->isConnected()) { |
|
| 200 | 200 | $this->connect(); |
| 201 | 201 | } |
| 202 | 202 | |
@@ -221,7 +221,7 @@ discard block |
||
| 221 | 221 | */ |
| 222 | 222 | private function checkConnection($start) |
| 223 | 223 | { |
| 224 | - if (! $this->ready()) { |
|
| 224 | + if (!$this->ready()) { |
|
| 225 | 225 | if (time() - $start > $this->timeout) { |
| 226 | 226 | $this->disconnect(); |
| 227 | 227 | throw new HttpException("Connection timed out!"); |
@@ -328,7 +328,7 @@ discard block |
||
| 328 | 328 | $numBytes = 1; |
| 329 | 329 | $start = time(); |
| 330 | 330 | while (true) { |
| 331 | - if (! $this->checkConnection($start)) { |
|
| 331 | + if (!$this->checkConnection($start)) { |
|
| 332 | 332 | continue; |
| 333 | 333 | } |
| 334 | 334 | |
@@ -341,7 +341,7 @@ discard block |
||
| 341 | 341 | $start = time(); // we have readen something => adjust timeout start point |
| 342 | 342 | $tmp .= $c; |
| 343 | 343 | |
| 344 | - if (! $delimiterFound) { |
|
| 344 | + if (!$delimiterFound) { |
|
| 345 | 345 | $this->handleHeader($delimiterFound, $numBytes, $tmp); |
| 346 | 346 | } |
| 347 | 347 | |
@@ -447,19 +447,19 @@ discard block |
||
| 447 | 447 | */ |
| 448 | 448 | private function adjustHeaders($requestType) |
| 449 | 449 | { |
| 450 | - if (! array_key_exists('Accept', $this->headers) && $requestType != 'HEAD') { |
|
| 450 | + if (!array_key_exists('Accept', $this->headers) && $requestType != 'HEAD') { |
|
| 451 | 451 | $this->setHeader('Accept', 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'); |
| 452 | 452 | } |
| 453 | 453 | |
| 454 | - if (! array_key_exists('Accept-Language', $this->headers) && $requestType != 'HEAD') { |
|
| 454 | + if (!array_key_exists('Accept-Language', $this->headers) && $requestType != 'HEAD') { |
|
| 455 | 455 | $this->setHeader('Accept-Language', 'en-US;q=0.7,en;q=0.3'); |
| 456 | 456 | } |
| 457 | 457 | |
| 458 | - if (! array_key_exists('User-Agent', $this->headers) && $requestType != 'HEAD') { |
|
| 458 | + if (!array_key_exists('User-Agent', $this->headers) && $requestType != 'HEAD') { |
|
| 459 | 459 | $this->setHeader('User-Agent', 'phpGenerics 1.0'); |
| 460 | 460 | } |
| 461 | 461 | |
| 462 | - if (! array_key_exists('Connection', $this->headers) || strlen($this->headers['Connection']) == 0) { |
|
| 462 | + if (!array_key_exists('Connection', $this->headers) || strlen($this->headers['Connection']) == 0) { |
|
| 463 | 463 | $this->adjustConnectionHeader($requestType); |
| 464 | 464 | } |
| 465 | 465 | } |