Skip to content

Commit 609dfb8

Browse files
authored
Format code by the latest cs-fixer. (#6617)
1 parent 32fa4aa commit 609dfb8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+62
-12
lines changed

src/Base/MessageTrait.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\HttpMessage\Base;
1314

1415
use Hyperf\HttpMessage\Stream\SwooleStream;

src/Base/Request.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\HttpMessage\Base;
1314

1415
use Hyperf\HttpMessage\Stream\SwooleStream;
@@ -221,7 +222,7 @@ public function setMethod(string $method): static
221222
return $this;
222223
}
223224

224-
public function setUri(UriInterface|string $uri, ?bool $preserveHost = null): static
225+
public function setUri(string|UriInterface $uri, ?bool $preserveHost = null): static
225226
{
226227
$this->uri = $uri;
227228

src/Base/Response.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\HttpMessage\Base;
1314

1415
use InvalidArgumentException;

src/ConfigProvider.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\HttpMessage;
1314

1415
use Hyperf\HttpMessage\Server\Request\Parser;

src/Cookie/Cookie.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\HttpMessage\Cookie;
1314

1415
use DateTimeInterface;

src/Cookie/CookieJar.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\HttpMessage\Cookie;
1314

1415
use ArrayIterator;

src/Cookie/CookieJarInterface.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\HttpMessage\Cookie;
1314

1415
use Countable;

src/Cookie/FileCookieJar.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\HttpMessage\Cookie;
1314

1415
use Hyperf\Codec\Json;

src/Cookie/SessionCookieJar.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\HttpMessage\Cookie;
1314

1415
use RuntimeException;

src/Cookie/SetCookie.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\HttpMessage\Cookie;
1314

1415
use Hyperf\Contract\Arrayable;
@@ -160,8 +161,6 @@ public function getDomain(): ?string
160161

161162
/**
162163
* Set the domain of the cookie.
163-
*
164-
* @param string $domain
165164
*/
166165
public function setDomain(?string $domain)
167166
{

src/Exception/BadRequestHttpException.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\HttpMessage\Exception;
1314

1415
use Psr\Http\Message\ServerRequestInterface;

src/Exception/ForbiddenHttpException.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\HttpMessage\Exception;
1314

1415
use Throwable;

src/Exception/HttpException.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\HttpMessage\Exception;
1314

1415
use Hyperf\HttpMessage\Server\Response;

src/Exception/MethodNotAllowedHttpException.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\HttpMessage\Exception;
1314

1415
use Throwable;

src/Exception/NotAcceptableHttpException.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\HttpMessage\Exception;
1314

1415
use Throwable;

src/Exception/NotFoundHttpException.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\HttpMessage\Exception;
1314

1415
use Throwable;

src/Exception/RangeNotSatisfiableHttpException.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\HttpMessage\Exception;
1314

1415
use Throwable;

src/Exception/ServerErrorHttpException.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\HttpMessage\Exception;
1314

1415
use Throwable;

src/Exception/UnauthorizedHttpException.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\HttpMessage\Exception;
1314

1415
use Throwable;

src/Exception/UnprocessableEntityHttpException.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\HttpMessage\Exception;
1314

1415
use Throwable;

src/Exception/UnsupportedMediaTypeHttpException.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\HttpMessage\Exception;
1314

1415
use Throwable;

src/Server/Chunk/Chunkable.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\HttpMessage\Server\Chunk;
1314

1415
interface Chunkable

src/Server/Chunk/HasChunk.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\HttpMessage\Server\Chunk;
1314

1415
use Hyperf\Engine\Contract\Http\Writable;

src/Server/Request.php

+4-3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\HttpMessage\Server;
1314

1415
use Hyperf\Context\ApplicationContext;
@@ -53,7 +54,7 @@ class Request extends \Hyperf\HttpMessage\Base\Request implements ServerRequestI
5354
/**
5455
* Load a swoole request, and transfer to a psr-7 request object.
5556
*
56-
* @return \Hyperf\HttpMessage\Server\Request
57+
* @return Request
5758
*/
5859
public static function loadFromSwooleRequest(Swoole\Http\Request $swooleRequest)
5960
{
@@ -221,7 +222,7 @@ public function withUploadedFiles(array $uploadedFiles): static
221222
* @return null|array|object The deserialized body parameters, if any.
222223
* These will typically be an array or object.
223224
*/
224-
public function getParsedBody(): array|object|null
225+
public function getParsedBody(): null|array|object
225226
{
226227
return $this->parsedBody;
227228
}
@@ -434,7 +435,7 @@ public function setCookieParams(array $cookies): static
434435
return $this;
435436
}
436437

437-
public function setParsedBody(object|array|null $data): static
438+
public function setParsedBody(null|array|object $data): static
438439
{
439440
$this->parsedBody = $data;
440441
return $this;

src/Server/Request/JsonParser.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\HttpMessage\Server\Request;
1314

1415
use Hyperf\Codec\Json;

src/Server/Request/Parser.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\HttpMessage\Server\Request;
1314

1415
use Hyperf\HttpMessage\Server\RequestParserInterface;

src/Server/Request/XmlParser.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\HttpMessage\Server\Request;
1314

1415
use Hyperf\Codec\Xml;

src/Server/RequestParserInterface.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\HttpMessage\Server;
1314

1415
interface RequestParserInterface

src/Server/Response.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\HttpMessage\Server;
1314

1415
use Hyperf\Engine\Contract\Http\Writable;

src/Server/ResponsePlusProxy.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\HttpMessage\Server;
1314

1415
use Hyperf\Coroutine\Exception\InvalidArgumentException;

src/Server/ResponseProxyTrait.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\HttpMessage\Server;
1314

1415
use Hyperf\HttpMessage\Cookie\Cookie;

src/Stream/FileInterface.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\HttpMessage\Stream;
1314

1415
interface FileInterface

src/Stream/StandardStream.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\HttpMessage\Stream;
1314

1415
use Exception;

src/Stream/SwooleFileStream.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\HttpMessage\Stream;
1314

1415
use BadMethodCallException;
@@ -17,6 +18,7 @@
1718
use RuntimeException;
1819
use SplFileInfo;
1920
use Stringable;
21+
use Throwable;
2022

2123
class SwooleFileStream implements StreamInterface, FileInterface, Stringable
2224
{
@@ -55,7 +57,7 @@ public function __toString(): string
5557
{
5658
try {
5759
return $this->getContents();
58-
} catch (\Throwable) {
60+
} catch (Throwable) {
5961
return '';
6062
}
6163
}

src/Stream/SwooleStream.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,14 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\HttpMessage\Stream;
1314

1415
use BadMethodCallException;
1516
use Psr\Http\Message\StreamInterface;
1617
use RuntimeException;
1718
use Stringable;
19+
use Throwable;
1820

1921
class SwooleStream implements StreamInterface, Stringable
2022
{
@@ -45,7 +47,7 @@ public function __toString(): string
4547
{
4648
try {
4749
return $this->getContents();
48-
} catch (\Throwable) {
50+
} catch (Throwable) {
4951
return '';
5052
}
5153
}

src/Upload/UploadedFile.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\HttpMessage\Upload;
1314

1415
use Hyperf\HttpMessage\Stream\StandardStream;

src/Uri/Uri.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\HttpMessage\Uri;
1314

1415
use InvalidArgumentException;

tests/MessageTraitTest.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace HyperfTest\HttpMessage;
1314

1415
use Hyperf\HttpMessage\Base\Request;

tests/RequestParserTest.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace HyperfTest\HttpMessage;
1314

1415
use Hyperf\HttpMessage\Exception\BadRequestHttpException;

tests/ResponseProxyTest.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace HyperfTest\HttpMessage;
1314

1415
use Hyperf\HttpMessage\Server\Response;

0 commit comments

Comments
 (0)