Skip to content

Commit 998ba36

Browse files
committed
refactor: use array unpackaging insted of call_user_func_array
1 parent d06bab7 commit 998ba36

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

77
## [Unreleased]
8+
### Changed
9+
- Use array unpackaging instead of using `call_user_func_array` instead in ResourceCall class
810

911
## [1.0.3] - 2020-03-14
1012
### Fixed

src/Model/ResourceCall.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ public function __construct(MtaResource $resource)
3030

3131
public function __call(string $name, array $arguments)
3232
{
33-
array_unshift($arguments, $name);
34-
return call_user_func_array([$this->resource, 'call'], $arguments);
33+
return $this->resource->call($name, ...$arguments);
3534
}
3635
}

0 commit comments

Comments
 (0)