Skip to content

Commit 1113f31

Browse files
committed
laravel 10
1 parent 1eecfc4 commit 1113f31

13 files changed

+126
-114
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
strategy:
1010
fail-fast: true
1111
matrix:
12-
php: [ '7.2', '7.3', '7.4', '8.0', '8.1' ]
12+
php: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2' ]
1313
stability: [ prefer-stable ]
1414

1515
name: PHP ${{ matrix.php }} - ${{ matrix.stability }}

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
},
2222
"require-dev": {
2323
"mockery/mockery": "^0.9|^1.3",
24-
"orchestra/testbench": "^5.19|^6.18|^7.0",
24+
"orchestra/testbench": "^5.19|^6.18|^7.0|^8.0",
2525
"phpunit/phpunit": "^8.5|^9.1"
2626
},
2727
"autoload": {

src/BatchRequest.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,12 @@ class BatchRequest
4141
* @var ParallelRequest
4242
*/
4343
private $request;
44+
4445
/**
4546
* @var int
4647
*/
4748
private $times;
49+
4850
/**
4951
* @var string[]
5052
*/
@@ -67,8 +69,9 @@ class BatchRequest
6769

6870
/**
6971
* Batch constructor.
70-
* @param ParallelRequest $request
71-
* @param int $times
72+
*
73+
* @param ParallelRequest $request
74+
* @param int $times
7275
*/
7376
public function __construct(ParallelRequest $request, int $times)
7477
{
@@ -91,7 +94,7 @@ public function __call($method, $arguments)
9194
}
9295

9396
/**
94-
* @param callable $callable
97+
* @param callable $callable
9598
* @return PromiseInterface[]
9699
*/
97100
public function handle(callable $callable): array

src/Concerns/InteractsWithAuthentication.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ trait InteractsWithAuthentication
1313
* @var string|null
1414
*/
1515
protected $guard;
16+
1617
/**
1718
* @var string|null
1819
*/
@@ -21,8 +22,8 @@ trait InteractsWithAuthentication
2122
/**
2223
* Set the currently logged in user for the application.
2324
*
24-
* @param \Illuminate\Contracts\Auth\Authenticatable $user
25-
* @param string|null $guard
25+
* @param \Illuminate\Contracts\Auth\Authenticatable $user
26+
* @param string|null $guard
2627
* @return $this
2728
*/
2829
public function actingAs(UserContract $user, $guard = null)
@@ -33,8 +34,8 @@ public function actingAs(UserContract $user, $guard = null)
3334
/**
3435
* Set the currently logged in user for the application.
3536
*
36-
* @param \Illuminate\Contracts\Auth\Authenticatable $user
37-
* @param string|null $guard
37+
* @param \Illuminate\Contracts\Auth\Authenticatable $user
38+
* @param string|null $guard
3839
* @return $this
3940
*/
4041
public function be(UserContract $user, $guard = null)

src/Concerns/MakesHttpRequests.php

Lines changed: 62 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ trait MakesHttpRequests
6868
/**
6969
* Define additional headers to be sent with the request.
7070
*
71-
* @param array $headers
71+
* @param array $headers
7272
* @return $this
7373
*/
7474
public function withHeaders(array $headers): self
@@ -81,8 +81,8 @@ public function withHeaders(array $headers): self
8181
/**
8282
* Add a header to be sent with the request.
8383
*
84-
* @param string $name
85-
* @param string $value
84+
* @param string $name
85+
* @param string $value
8686
* @return $this
8787
*/
8888
public function withHeader(string $name, string $value): self
@@ -95,8 +95,8 @@ public function withHeader(string $name, string $value): self
9595
/**
9696
* Add an authorization token for the request.
9797
*
98-
* @param string $token
99-
* @param string $type
98+
* @param string $token
99+
* @param string $type
100100
* @return $this
101101
*/
102102
public function withToken(string $token, string $type = 'Bearer'): self
@@ -119,7 +119,7 @@ public function flushHeaders(): self
119119
/**
120120
* Define a set of server variables to be sent with the requests.
121121
*
122-
* @param array $server
122+
* @param array $server
123123
* @return $this
124124
*/
125125
public function withServerVariables(array $server): self
@@ -132,7 +132,7 @@ public function withServerVariables(array $server): self
132132
/**
133133
* Disable middleware for the test.
134134
*
135-
* @param string|array|null $middleware
135+
* @param string|array|null $middleware
136136
* @return $this
137137
*/
138138
public function withoutMiddleware($middleware = null): self
@@ -145,7 +145,7 @@ public function withoutMiddleware($middleware = null): self
145145
/**
146146
* Enable the given middleware for the test.
147147
*
148-
* @param string|array|null $middleware
148+
* @param string|array|null $middleware
149149
* @return $this
150150
*/
151151
public function withMiddleware($middleware = null): self
@@ -158,7 +158,7 @@ public function withMiddleware($middleware = null): self
158158
/**
159159
* Define additional cookies to be sent with the request.
160160
*
161-
* @param array $cookies
161+
* @param array $cookies
162162
* @return $this
163163
*/
164164
public function withCookies(array $cookies): self
@@ -171,8 +171,8 @@ public function withCookies(array $cookies): self
171171
/**
172172
* Add a cookie to be sent with the request.
173173
*
174-
* @param string $name
175-
* @param string $value
174+
* @param string $name
175+
* @param string $value
176176
* @return $this
177177
*/
178178
public function withCookie(string $name, string $value): self
@@ -185,7 +185,7 @@ public function withCookie(string $name, string $value): self
185185
/**
186186
* Define additional cookies will not be encrypted before sending with the request.
187187
*
188-
* @param array $cookies
188+
* @param array $cookies
189189
* @return $this
190190
*/
191191
public function withUnencryptedCookies(array $cookies): self
@@ -198,8 +198,8 @@ public function withUnencryptedCookies(array $cookies): self
198198
/**
199199
* Add a cookie will not be encrypted before sending with the request.
200200
*
201-
* @param string $name
202-
* @param string $value
201+
* @param string $name
202+
* @param string $value
203203
* @return $this
204204
*/
205205
public function withUnencryptedCookie(string $name, string $value): self
@@ -248,7 +248,7 @@ public function disableCookieEncryption(): self
248248
/**
249249
* Set the referer header and previous URL session value in order to simulate a previous request.
250250
*
251-
* @param string $url
251+
* @param string $url
252252
* @return $this
253253
*/
254254
public function from(string $url): self
@@ -259,8 +259,8 @@ public function from(string $url): self
259259
/**
260260
* Visit the given URI with a GET request.
261261
*
262-
* @param string $uri
263-
* @param array $headers
262+
* @param string $uri
263+
* @param array $headers
264264
* @return PromiseInterface
265265
*/
266266
public function get(string $uri, array $headers = []): PromiseInterface
@@ -274,8 +274,8 @@ public function get(string $uri, array $headers = []): PromiseInterface
274274
/**
275275
* Visit the given URI with a GET request, expecting a JSON response.
276276
*
277-
* @param string $uri
278-
* @param array $headers
277+
* @param string $uri
278+
* @param array $headers
279279
* @return PromiseInterface
280280
*/
281281
public function getJson(string $uri, array $headers = []): PromiseInterface
@@ -286,9 +286,9 @@ public function getJson(string $uri, array $headers = []): PromiseInterface
286286
/**
287287
* Visit the given URI with a POST request.
288288
*
289-
* @param string $uri
290-
* @param array $data
291-
* @param array $headers
289+
* @param string $uri
290+
* @param array $data
291+
* @param array $headers
292292
* @return PromiseInterface
293293
*/
294294
public function post(string $uri, array $data = [], array $headers = []): PromiseInterface
@@ -302,9 +302,9 @@ public function post(string $uri, array $data = [], array $headers = []): Promis
302302
/**
303303
* Visit the given URI with a POST request, expecting a JSON response.
304304
*
305-
* @param string $uri
306-
* @param array $data
307-
* @param array $headers
305+
* @param string $uri
306+
* @param array $data
307+
* @param array $headers
308308
* @return PromiseInterface
309309
*/
310310
public function postJson(string $uri, array $data = [], array $headers = []): PromiseInterface
@@ -315,9 +315,9 @@ public function postJson(string $uri, array $data = [], array $headers = []): Pr
315315
/**
316316
* Visit the given URI with a PUT request.
317317
*
318-
* @param string $uri
319-
* @param array $data
320-
* @param array $headers
318+
* @param string $uri
319+
* @param array $data
320+
* @param array $headers
321321
* @return PromiseInterface
322322
*/
323323
public function put(string $uri, array $data = [], array $headers = []): PromiseInterface
@@ -331,9 +331,9 @@ public function put(string $uri, array $data = [], array $headers = []): Promise
331331
/**
332332
* Visit the given URI with a PUT request, expecting a JSON response.
333333
*
334-
* @param string $uri
335-
* @param array $data
336-
* @param array $headers
334+
* @param string $uri
335+
* @param array $data
336+
* @param array $headers
337337
* @return PromiseInterface
338338
*/
339339
public function putJson(string $uri, array $data = [], array $headers = []): PromiseInterface
@@ -344,9 +344,9 @@ public function putJson(string $uri, array $data = [], array $headers = []): Pro
344344
/**
345345
* Visit the given URI with a PATCH request.
346346
*
347-
* @param string $uri
348-
* @param array $data
349-
* @param array $headers
347+
* @param string $uri
348+
* @param array $data
349+
* @param array $headers
350350
* @return PromiseInterface
351351
*/
352352
public function patch(string $uri, array $data = [], array $headers = []): PromiseInterface
@@ -360,9 +360,9 @@ public function patch(string $uri, array $data = [], array $headers = []): Promi
360360
/**
361361
* Visit the given URI with a PATCH request, expecting a JSON response.
362362
*
363-
* @param string $uri
364-
* @param array $data
365-
* @param array $headers
363+
* @param string $uri
364+
* @param array $data
365+
* @param array $headers
366366
* @return PromiseInterface
367367
*/
368368
public function patchJson(string $uri, array $data = [], array $headers = []): PromiseInterface
@@ -373,9 +373,9 @@ public function patchJson(string $uri, array $data = [], array $headers = []): P
373373
/**
374374
* Visit the given URI with a DELETE request.
375375
*
376-
* @param string $uri
377-
* @param array $data
378-
* @param array $headers
376+
* @param string $uri
377+
* @param array $data
378+
* @param array $headers
379379
* @return PromiseInterface
380380
*/
381381
public function delete(string $uri, array $data = [], array $headers = []): PromiseInterface
@@ -389,9 +389,9 @@ public function delete(string $uri, array $data = [], array $headers = []): Prom
389389
/**
390390
* Visit the given URI with a DELETE request, expecting a JSON response.
391391
*
392-
* @param string $uri
393-
* @param array $data
394-
* @param array $headers
392+
* @param string $uri
393+
* @param array $data
394+
* @param array $headers
395395
* @return PromiseInterface
396396
*/
397397
public function deleteJson(string $uri, array $data = [], array $headers = []): PromiseInterface
@@ -402,9 +402,9 @@ public function deleteJson(string $uri, array $data = [], array $headers = []):
402402
/**
403403
* Visit the given URI with an OPTIONS request.
404404
*
405-
* @param string $uri
406-
* @param array $data
407-
* @param array $headers
405+
* @param string $uri
406+
* @param array $data
407+
* @param array $headers
408408
* @return PromiseInterface
409409
*/
410410
public function options(string $uri, array $data = [], array $headers = []): PromiseInterface
@@ -418,9 +418,9 @@ public function options(string $uri, array $data = [], array $headers = []): Pro
418418
/**
419419
* Visit the given URI with an OPTIONS request, expecting a JSON response.
420420
*
421-
* @param string $uri
422-
* @param array $data
423-
* @param array $headers
421+
* @param string $uri
422+
* @param array $data
423+
* @param array $headers
424424
* @return PromiseInterface
425425
*/
426426
public function optionsJson(string $uri, array $data = [], array $headers = []): PromiseInterface
@@ -431,10 +431,10 @@ public function optionsJson(string $uri, array $data = [], array $headers = []):
431431
/**
432432
* Call the given URI with a JSON request.
433433
*
434-
* @param string $method
435-
* @param string $uri
436-
* @param array $data
437-
* @param array $headers
434+
* @param string $method
435+
* @param string $uri
436+
* @param array $data
437+
* @param array $headers
438438
* @return PromiseInterface
439439
*/
440440
public function json(string $method, string $uri, array $data = [], array $headers = []): PromiseInterface
@@ -461,19 +461,19 @@ public function json(string $method, string $uri, array $data = [], array $heade
461461
/**
462462
* Call the given URI and return the Response.
463463
*
464-
* @param string $method
465-
* @param string $uri
466-
* @param array $parameters
467-
* @param array $cookies
468-
* @param array $files
469-
* @param array $server
470-
* @param null $content
464+
* @param string $method
465+
* @param string $uri
466+
* @param array $parameters
467+
* @param array $cookies
468+
* @param array $files
469+
* @param array $server
470+
* @param null $content
471471
* @return PromiseInterface
472472
*/
473473
abstract public function call(string $method, string $uri, array $parameters = [], array $cookies = [], array $files = [], array $server = [], $content = null): PromiseInterface;
474474

475475
/**
476-
* @param array $headers
476+
* @param array $headers
477477
* @return array
478478
*/
479479
private function transformHeadersToServerVars(array $headers): array
@@ -490,7 +490,7 @@ private function transformHeadersToServerVars(array $headers): array
490490
}
491491

492492
/**
493-
* @param string $name
493+
* @param string $name
494494
* @return string
495495
*/
496496
private function formatServerHeaderKey(string $name): string

0 commit comments

Comments
 (0)