Skip to content

Commit 1eb8d83

Browse files
committed
Add method signature to __call
1 parent 0174ad3 commit 1eb8d83

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

phpstan-baseline.php

-5
Original file line numberDiff line numberDiff line change
@@ -3526,11 +3526,6 @@
35263526
'count' => 1,
35273527
'path' => __DIR__ . '/system/Test/TestLogger.php',
35283528
];
3529-
$ignoreErrors[] = [
3530-
'message' => '#^Method CodeIgniter\\\\Test\\\\TestResponse\\:\\:__call\\(\\) should return mixed but return statement is missing\\.$#',
3531-
'count' => 1,
3532-
'path' => __DIR__ . '/system/Test/TestResponse.php',
3533-
];
35343529
$ignoreErrors[] = [
35353530
'message' => '#^Property CodeIgniter\\\\Throttle\\\\Throttler\\:\\:\\$testTime \\(int\\) on left side of \\?\\? is not nullable\\.$#',
35363531
'count' => 1,

system/Test/TestResponse.php

+4-5
Original file line numberDiff line numberDiff line change
@@ -479,15 +479,14 @@ public function assertSeeInField(string $field, ?string $value = null): void
479479
/**
480480
* Forward any unrecognized method calls to our DOMParser instance.
481481
*
482-
* @param string $function Method name
483-
* @param mixed $params Any method parameters
484-
*
485-
* @return mixed
482+
* @param mixed[] $params
486483
*/
487-
public function __call($function, $params)
484+
public function __call(string $function, array $params): mixed
488485
{
489486
if (method_exists($this->domParser, $function)) {
490487
return $this->domParser->{$function}(...$params);
491488
}
489+
490+
return null;
492491
}
493492
}

0 commit comments

Comments
 (0)