Skip to content

Commit fbe4ab6

Browse files
Optimized the parameters of method __call() to make them more standardized. (#7637)
Co-authored-by: 李铭昕 <715557344@qq.com>
1 parent b95d54a commit fbe4ab6

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/Http/TestResponse.php

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,18 +53,14 @@ public function __construct(protected ResponseInterface $response)
5353

5454
/**
5555
* Handle dynamic calls into macros or pass missing methods to the base response.
56-
*
57-
* @param string $method
58-
* @param array $args
59-
* @return mixed
6056
*/
61-
public function __call($method, $args)
57+
public function __call(string $name, array $arguments): mixed
6258
{
63-
if (static::hasMacro($method)) {
64-
return $this->macroCall($method, $args);
59+
if (static::hasMacro($name)) {
60+
return $this->macroCall($name, $arguments);
6561
}
6662

67-
return $this->response->{$method}(...$args);
63+
return $this->response->{$name}(...$arguments);
6864
}
6965

7066
/**

0 commit comments

Comments
 (0)