Skip to content

Commit 303dbec

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

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/HigherOrderCollectionProxy.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ public function __get(string $key)
4343
/**
4444
* Proxy a method call onto the collection items.
4545
*/
46-
public function __call(string $method, array $parameters)
46+
public function __call(string $name, array $arguments): mixed
4747
{
48-
return $this->collection->{$this->method}(function ($value) use ($method, $parameters) {
49-
return $value->{$method}(...$parameters);
48+
return $this->collection->{$this->method}(function ($value) use ($name, $arguments) {
49+
return $value->{$name}(...$arguments);
5050
});
5151
}
5252
}

0 commit comments

Comments
 (0)