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 | |
parent | 4b7e40b3bbf03a5bdccd0303a6490513c9eb5d46 (diff) |
CS
Diffstat (limited to 'src')
-rw-r--r-- | src/PSR7Client.php | 24 | ||||
-rw-r--r-- | src/Worker.php | 5 |
2 files changed, 11 insertions, 18 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. * diff --git a/src/Worker.php b/src/Worker.php index 4405cd70..7f92a714 100644 --- a/src/Worker.php +++ b/src/Worker.php @@ -42,8 +42,8 @@ class Worker * return Error to wrap error message from server. * * @param mixed $header - * * @return \Error|null|string + * * @throws GoridgeException */ public function receive(&$header) @@ -128,8 +128,7 @@ class Worker * @param string $body * @param mixed $header Exported context (if any). * @param int $flags - * - * @returns bool True when continue processing. + * @return bool True when continue processing. * * @throws RoadRunnerException */ |