Skip to content

Commit

Permalink
Merge pull request #24 from shahruslan/feature/ide-helper
Browse files Browse the repository at this point in the history
Added type hint
  • Loading branch information
bilfeldt authored Jan 18, 2023
2 parents c14e835 + 54227f9 commit 76e8015
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/LaravelHttpClientLoggerServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function packageBooted()
$config = [],
?HttpLoggerInterface $logger = null,
?HttpLoggingFilterInterface $filter = null
) {
): PendingRequest {
/** @var \Illuminate\Http\Client\PendingRequest $this */
return $this->withMiddleware((new LoggingMiddleware(
$logger ?? app(HttpLoggerInterface::class),
Expand All @@ -49,7 +49,7 @@ public function packageBooted()
$config = [],
?HttpLoggerInterface $logger = null,
?HttpLoggingFilterInterface $filter = null
) {
): PendingRequest {
if (value($condition)) {
/** @var \Illuminate\Http\Client\PendingRequest $this */
return $this->log($context, $config, $logger, $filter);
Expand All @@ -59,7 +59,7 @@ public function packageBooted()
}
});

PendingRequest::macro('logWith', function (HttpLoggerInterface $logger = null) {
PendingRequest::macro('logWith', function (HttpLoggerInterface $logger = null): PendingRequest {
/** @var \Illuminate\Http\Client\PendingRequest $this */
return $this->withMiddleware((new LoggingMiddleware($logger, new LogAllFilter()))->__invoke());
});
Expand Down

0 comments on commit 76e8015

Please sign in to comment.