Skip to content

Commit 7a552d3

Browse files
committed
test: fix incorrect type definition
1 parent 9ba3fea commit 7a552d3

File tree

2 files changed

+2
-17
lines changed

2 files changed

+2
-17
lines changed

phpstan-baseline.php

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12906,11 +12906,6 @@
1290612906
'count' => 1,
1290712907
'path' => __DIR__ . '/tests/system/HTTP/CLIRequestTest.php',
1290812908
];
12909-
$ignoreErrors[] = [
12910-
'message' => '#^Access to an undefined property CodeIgniter\\\\HTTP\\\\CURLRequest\\:\\:\\$curl_options\\.$#',
12911-
'count' => 39,
12912-
'path' => __DIR__ . '/tests/system/HTTP/CURLRequestDoNotShareOptionsTest.php',
12913-
];
1291412909
$ignoreErrors[] = [
1291512910
'message' => '#^Assigning \'10\' directly on offset \'HTTP_CONTENT_LENGTH\' of \\$_SERVER is discouraged\\.$#',
1291612911
'count' => 1,
@@ -12931,16 +12926,6 @@
1293112926
'count' => 1,
1293212927
'path' => __DIR__ . '/tests/system/HTTP/CURLRequestDoNotShareOptionsTest.php',
1293312928
];
12934-
$ignoreErrors[] = [
12935-
'message' => '#^Call to an undefined method CodeIgniter\\\\HTTP\\\\CURLRequest\\:\\:setOutput\\(\\)\\.$#',
12936-
'count' => 3,
12937-
'path' => __DIR__ . '/tests/system/HTTP/CURLRequestDoNotShareOptionsTest.php',
12938-
];
12939-
$ignoreErrors[] = [
12940-
'message' => '#^Method CodeIgniter\\\\HTTP\\\\CURLRequestDoNotShareOptionsTest\\:\\:getRequest\\(\\) has no return type specified\\.$#',
12941-
'count' => 1,
12942-
'path' => __DIR__ . '/tests/system/HTTP/CURLRequestDoNotShareOptionsTest.php',
12943-
];
1294412929
$ignoreErrors[] = [
1294512930
'message' => '#^Method CodeIgniter\\\\HTTP\\\\CURLRequestDoNotShareOptionsTest\\:\\:getRequest\\(\\) has parameter \\$options with no value type specified in iterable type array\\.$#',
1294612931
'count' => 1,

tests/system/HTTP/CURLRequestDoNotShareOptionsTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
*/
3030
final class CURLRequestDoNotShareOptionsTest extends CIUnitTestCase
3131
{
32-
private CURLRequest $request;
32+
private MockCURLRequest $request;
3333

3434
protected function setUp(): void
3535
{
@@ -39,7 +39,7 @@ protected function setUp(): void
3939
$this->request = $this->getRequest();
4040
}
4141

42-
protected function getRequest(array $options = [])
42+
protected function getRequest(array $options = []): MockCURLRequest
4343
{
4444
$uri = isset($options['base_uri']) ? new URI($options['base_uri']) : new URI();
4545
$app = new App();

0 commit comments

Comments
 (0)