diff options
author | Wolfy-J <[email protected]> | 2018-10-04 21:40:07 +0300 |
---|---|---|
committer | Wolfy-J <[email protected]> | 2018-10-04 21:40:07 +0300 |
commit | d46f4fc763e987dcc623b7be00436c79c3cf4551 (patch) | |
tree | 2dbd2c0f87678d2011cb5e732a22f63e66ecb2b7 /src/PSR7Client.php | |
parent | 4b7e40b3bbf03a5bdccd0303a6490513c9eb5d46 (diff) |
CS
Diffstat (limited to 'src/PSR7Client.php')
-rw-r--r-- | src/PSR7Client.php | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/src/PSR7Client.php b/src/PSR7Client.php index 7000018e..494342fa 100644 --- a/src/PSR7Client.php +++ b/src/PSR7Client.php @@ -19,24 +19,16 @@ use Psr\Http\Message\UploadedFileFactoryInterface; */ class PSR7Client { - /** - * @var Worker - */ + /** @var Worker */ private $worker; - /** - * @var ServerRequestFactoryInterface - */ + /** @var ServerRequestFactoryInterface */ private $requestFactory; - /** - * @var StreamFactoryInterface - */ + /** @var StreamFactoryInterface */ private $streamFactory; - /** - * @var UploadedFileFactoryInterface - */ + /*** @var UploadedFileFactoryInterface */ private $uploadsFactory; /** @@ -106,8 +98,10 @@ class PSR7Client if ($ctx['parsed']) { $request = $request->withParsedBody(json_decode($body, true)); - } else if ($body !== null) { - $request = $request->withBody($this->streamFactory->createStream($body)); + } else { + if ($body !== null) { + $request = $request->withBody($this->streamFactory->createStream($body)); + } } return $request; @@ -132,7 +126,7 @@ class PSR7Client ])); } - /** + /** * Returns altered copy of _SERVER variable. Sets ip-address, * request-time and other values. * |