Skip to content

Commit 6c0d272

Browse files
authored
Remove unused returns and callback parameters (#41203)
1 parent 34a57fa commit 6c0d272

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

src/Illuminate/Http/Client/PendingRequest.php

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ public function asMultipart()
299299
*/
300300
public function bodyFormat(string $format)
301301
{
302-
return tap($this, function ($request) use ($format) {
302+
return tap($this, function () use ($format) {
303303
$this->bodyFormat = $format;
304304
});
305305
}
@@ -344,8 +344,8 @@ public function accept($contentType)
344344
*/
345345
public function withHeaders(array $headers)
346346
{
347-
return tap($this, function ($request) use ($headers) {
348-
return $this->options = array_merge_recursive($this->options, [
347+
return tap($this, function () use ($headers) {
348+
$this->options = array_merge_recursive($this->options, [
349349
'headers' => $headers,
350350
]);
351351
});
@@ -360,8 +360,8 @@ public function withHeaders(array $headers)
360360
*/
361361
public function withBasicAuth(string $username, string $password)
362362
{
363-
return tap($this, function ($request) use ($username, $password) {
364-
return $this->options['auth'] = [$username, $password];
363+
return tap($this, function () use ($username, $password) {
364+
$this->options['auth'] = [$username, $password];
365365
});
366366
}
367367

@@ -374,8 +374,8 @@ public function withBasicAuth(string $username, string $password)
374374
*/
375375
public function withDigestAuth($username, $password)
376376
{
377-
return tap($this, function ($request) use ($username, $password) {
378-
return $this->options['auth'] = [$username, $password, 'digest'];
377+
return tap($this, function () use ($username, $password) {
378+
$this->options['auth'] = [$username, $password, 'digest'];
379379
});
380380
}
381381

@@ -388,8 +388,8 @@ public function withDigestAuth($username, $password)
388388
*/
389389
public function withToken($token, $type = 'Bearer')
390390
{
391-
return tap($this, function ($request) use ($token, $type) {
392-
return $this->options['headers']['Authorization'] = trim($type.' '.$token);
391+
return tap($this, function () use ($token, $type) {
392+
$this->options['headers']['Authorization'] = trim($type.' '.$token);
393393
});
394394
}
395395

@@ -401,8 +401,8 @@ public function withToken($token, $type = 'Bearer')
401401
*/
402402
public function withUserAgent($userAgent)
403403
{
404-
return tap($this, function ($request) use ($userAgent) {
405-
return $this->options['headers']['User-Agent'] = trim($userAgent);
404+
return tap($this, function () use ($userAgent) {
405+
$this->options['headers']['User-Agent'] = trim($userAgent);
406406
});
407407
}
408408

@@ -415,8 +415,8 @@ public function withUserAgent($userAgent)
415415
*/
416416
public function withCookies(array $cookies, string $domain)
417417
{
418-
return tap($this, function ($request) use ($cookies, $domain) {
419-
return $this->options = array_merge_recursive($this->options, [
418+
return tap($this, function () use ($cookies, $domain) {
419+
$this->options = array_merge_recursive($this->options, [
420420
'cookies' => CookieJar::fromArray($cookies, $domain),
421421
]);
422422
});
@@ -429,8 +429,8 @@ public function withCookies(array $cookies, string $domain)
429429
*/
430430
public function withoutRedirecting()
431431
{
432-
return tap($this, function ($request) {
433-
return $this->options['allow_redirects'] = false;
432+
return tap($this, function () {
433+
$this->options['allow_redirects'] = false;
434434
});
435435
}
436436

@@ -441,8 +441,8 @@ public function withoutRedirecting()
441441
*/
442442
public function withoutVerifying()
443443
{
444-
return tap($this, function ($request) {
445-
return $this->options['verify'] = false;
444+
return tap($this, function () {
445+
$this->options['verify'] = false;
446446
});
447447
}
448448

@@ -454,8 +454,8 @@ public function withoutVerifying()
454454
*/
455455
public function sink($to)
456456
{
457-
return tap($this, function ($request) use ($to) {
458-
return $this->options['sink'] = $to;
457+
return tap($this, function () use ($to) {
458+
$this->options['sink'] = $to;
459459
});
460460
}
461461

@@ -512,8 +512,8 @@ public function retry(int $times, int $sleep = 0, ?callable $when = null, bool $
512512
*/
513513
public function withOptions(array $options)
514514
{
515-
return tap($this, function ($request) use ($options) {
516-
return $this->options = array_replace_recursive(
515+
return tap($this, function () use ($options) {
516+
$this->options = array_replace_recursive(
517517
array_merge_recursive($this->options, Arr::only($options, $this->mergableOptions)),
518518
$options
519519
);

0 commit comments

Comments
 (0)