Skip to content

Commit

Permalink
fix: construct param $config is not used
Browse files Browse the repository at this point in the history
The construct param should be used.
  • Loading branch information
kenjis committed Apr 11, 2024
1 parent e14e145 commit 4267477
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
5 changes: 0 additions & 5 deletions phpstan-baseline.php
Original file line number Diff line number Diff line change
Expand Up @@ -5336,11 +5336,6 @@
'count' => 10,
'path' => __DIR__ . '/system/HTTP/CURLRequest.php',
];
$ignoreErrors[] = [
'message' => '#^Constructor of class CodeIgniter\\\\HTTP\\\\CURLRequest has an unused parameter \\$config\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/HTTP/CURLRequest.php',
];
$ignoreErrors[] = [
'message' => '#^Method CodeIgniter\\\\HTTP\\\\CURLRequest\\:\\:__construct\\(\\) has parameter \\$options with no value type specified in iterable type array\\.$#',
'count' => 1,
Expand Down
2 changes: 1 addition & 1 deletion system/HTTP/CURLRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public function __construct(App $config, URI $uri, ?ResponseInterface $response

parent::__construct(Method::GET, $uri);

$this->responseOrig = $response ?? new Response(config(App::class));
$this->responseOrig = $response ?? new Response($config);
$this->baseURI = $uri->useRawQueryString();
$this->defaultOptions = $options;

Expand Down

0 comments on commit 4267477

Please sign in to comment.