Skip to content

Commit 44fbbbb

Browse files
authored
Format code. (#5069)
1 parent 0c6014d commit 44fbbbb

File tree

8 files changed

+23
-23
lines changed

8 files changed

+23
-23
lines changed

src/Base/MessageTrait.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,8 @@ public function getHeaderLine($name): string
159159
*
160160
* @param string $name case-insensitive header field name
161161
* @param string|string[] $value header value(s)
162-
* @throws \InvalidArgumentException for invalid header names or values
163162
* @return static
163+
* @throws \InvalidArgumentException for invalid header names or values
164164
*/
165165
public function withHeader($name, $value)
166166
{
@@ -201,8 +201,8 @@ public function withHeaders(array $headers): static
201201
*
202202
* @param string $name case-insensitive header field name to add
203203
* @param string|string[] $value header value(s)
204-
* @throws \InvalidArgumentException for invalid header names or values
205204
* @return static
205+
* @throws \InvalidArgumentException for invalid header names or values
206206
*/
207207
public function withAddedHeader($name, $value)
208208
{
@@ -273,8 +273,8 @@ public function getBody()
273273
* new body stream.
274274
*
275275
* @param StreamInterface $body body
276-
* @throws \InvalidArgumentException when the body is not valid
277276
* @return static
277+
* @throws \InvalidArgumentException when the body is not valid
278278
*/
279279
public function withBody(StreamInterface $body)
280280
{
@@ -299,8 +299,8 @@ public function withBody(StreamInterface $body)
299299
* @param string $name name of header, like in getHeader()
300300
* @param string $wantedPart the wanted part, default is first, if null an array with all parts is returned
301301
* @param string $firstName key name for the first part
302-
* @throws \RuntimeException
303302
* @return array|string wanted part or all parts as array($firstName => firstPart, partname => value)
303+
* @throws \RuntimeException
304304
*/
305305
public function getHeaderField(string $name, string $wantedPart = '0', string $firstName = '0')
306306
{

src/Base/Request.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,8 @@ public function getMethod()
137137
* changed request method.
138138
*
139139
* @param string $method case-sensitive method
140-
* @throws \InvalidArgumentException for invalid HTTP methods
141140
* @return static
141+
* @throws \InvalidArgumentException for invalid HTTP methods
142142
*/
143143
public function withMethod($method)
144144
{

src/Base/Response.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,8 @@ public function getStatusCode(): int
176176
* @param string $reasonPhrase the reason phrase to use with the
177177
* provided status code; if none is provided, implementations MAY
178178
* use the defaults as suggested in the HTTP specification
179-
* @throws \InvalidArgumentException for invalid status code arguments
180179
* @return static
180+
* @throws \InvalidArgumentException for invalid status code arguments
181181
*/
182182
public function withStatus($code, $reasonPhrase = '')
183183
{
@@ -201,8 +201,8 @@ public static function getReasonPhraseByCode(int $code): string
201201
/**
202202
* Return an instance with the specified charset content type.
203203
*
204-
* @throws \InvalidArgumentException
205204
* @return static
205+
* @throws \InvalidArgumentException
206206
*/
207207
public function withCharset(string $charset)
208208
{

src/Server/Request.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,8 @@ public function getUploadedFiles()
201201
* updated body parameters.
202202
*
203203
* @param array $uploadedFiles an array tree of UploadedFileInterface instances
204-
* @throws \InvalidArgumentException if an invalid structure is provided
205204
* @return static
205+
* @throws \InvalidArgumentException if an invalid structure is provided
206206
*/
207207
public function withUploadedFiles(array $uploadedFiles)
208208
{
@@ -273,9 +273,9 @@ public function getBodyParams(): mixed
273273
*
274274
* @param null|array|object $data The deserialized body data. This will
275275
* typically be in an array or object.
276+
* @return static
276277
* @throws \InvalidArgumentException if an unsupported argument type is
277278
* provided
278-
* @return static
279279
*/
280280
public function withParsedBody($data)
281281
{

src/Stream/SwooleFileStream.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ public function getSize()
9494
/**
9595
* Returns the current position of the file read/write pointer.
9696
*
97-
* @throws \RuntimeException on error
9897
* @return int Position of the file pointer
98+
* @throws \RuntimeException on error
9999
*/
100100
public function tell()
101101
{
@@ -167,8 +167,8 @@ public function isWritable()
167167
* Write data to the stream.
168168
*
169169
* @param string $string the string that is to be written
170-
* @throws \RuntimeException on failure
171170
* @return int returns the number of bytes written to the stream
171+
* @throws \RuntimeException on failure
172172
*/
173173
public function write($string)
174174
{
@@ -191,9 +191,9 @@ public function isReadable()
191191
* @param int $length Read up to $length bytes from the object and return them.
192192
* Fewer than $length bytes may be returned if underlying stream
193193
* call returns fewer bytes.
194-
* @throws \RuntimeException if an error occurs
195194
* @return string returns the data read from the stream, or an empty string
196195
* if no bytes are available
196+
* @throws \RuntimeException if an error occurs
197197
*/
198198
public function read($length)
199199
{
@@ -203,9 +203,9 @@ public function read($length)
203203
/**
204204
* Returns the remaining contents in a string.
205205
*
206+
* @return string
206207
* @throws \RuntimeException if unable to read or an error occurs while
207208
* reading
208-
* @return string
209209
*/
210210
public function getContents()
211211
{

src/Stream/SwooleStream.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ public function getSize()
8888
/**
8989
* Returns the current position of the file read/write pointer.
9090
*
91-
* @throws \RuntimeException on error
9291
* @return int Position of the file pointer
92+
* @throws \RuntimeException on error
9393
*/
9494
public function tell()
9595
{
@@ -161,8 +161,8 @@ public function isWritable()
161161
* Write data to the stream.
162162
*
163163
* @param string $string the string that is to be written
164-
* @throws \RuntimeException on failure
165164
* @return int returns the number of bytes written to the stream
165+
* @throws \RuntimeException on failure
166166
*/
167167
public function write($string)
168168
{
@@ -194,9 +194,9 @@ public function isReadable()
194194
* @param int $length Read up to $length bytes from the object and return
195195
* them. Fewer than $length bytes may be returned if underlying stream
196196
* call returns fewer bytes.
197-
* @throws \RuntimeException if an error occurs
198197
* @return string returns the data read from the stream, or an empty string
199198
* if no bytes are available
199+
* @throws \RuntimeException if an error occurs
200200
*/
201201
public function read($length)
202202
{
@@ -216,9 +216,9 @@ public function read($length)
216216
/**
217217
* Returns the remaining contents in a string.
218218
*
219+
* @return string
219220
* @throws \RuntimeException if unable to read or an error occurs while
220221
* reading
221-
* @return string
222222
*/
223223
public function getContents()
224224
{

src/Upload/UploadedFile.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,9 @@ public function isMoved(): bool
114114
* If the moveTo() method has been called previously, this method MUST raise
115115
* an exception.
116116
*
117+
* @return StreamInterface stream representation of the uploaded file
117118
* @throws \RuntimeException in cases when no stream is available or can be
118119
* created
119-
* @return StreamInterface stream representation of the uploaded file
120120
*/
121121
public function getStream()
122122
{

src/Uri/Uri.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -281,8 +281,8 @@ public function getFragment()
281281
* An empty scheme is equivalent to removing the scheme.
282282
*
283283
* @param string $scheme the scheme to use with the new instance
284-
* @throws \InvalidArgumentException for invalid or unsupported schemes
285284
* @return static a new instance with the specified scheme
285+
* @throws \InvalidArgumentException for invalid or unsupported schemes
286286
*/
287287
public function withScheme($scheme)
288288
{
@@ -332,8 +332,8 @@ public function withUserInfo($user, $password = null)
332332
* An empty host value is equivalent to removing the host.
333333
*
334334
* @param string $host the hostname to use with the new instance
335-
* @throws \InvalidArgumentException for invalid hostnames
336335
* @return static a new instance with the specified host
336+
* @throws \InvalidArgumentException for invalid hostnames
337337
*/
338338
public function withHost($host)
339339
{
@@ -358,8 +358,8 @@ public function withHost($host)
358358
*
359359
* @param null|int|string $port the port to use with the new instance; a null value
360360
* removes the port information
361-
* @throws \InvalidArgumentException for invalid ports
362361
* @return static a new instance with the specified port
362+
* @throws \InvalidArgumentException for invalid ports
363363
*/
364364
public function withPort($port)
365365
{
@@ -388,8 +388,8 @@ public function withPort($port)
388388
* Implementations ensure the correct encoding as outlined in getPath().
389389
*
390390
* @param string $path the path to use with the new instance
391-
* @throws \InvalidArgumentException for invalid paths
392391
* @return static a new instance with the specified path
392+
* @throws \InvalidArgumentException for invalid paths
393393
*/
394394
public function withPath($path)
395395
{
@@ -412,8 +412,8 @@ public function withPath($path)
412412
* An empty query string value is equivalent to removing the query string.
413413
*
414414
* @param string $query the query string to use with the new instance
415-
* @throws \InvalidArgumentException for invalid query strings
416415
* @return static a new instance with the specified query string
416+
* @throws \InvalidArgumentException for invalid query strings
417417
*/
418418
public function withQuery($query)
419419
{

0 commit comments

Comments
 (0)