We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| Total Complexity | 5 |
| Total Lines | 33 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | class ArgumentFactory |
||
| 8 | { |
||
| 9 | private $className; |
||
| 10 | |||
| 11 | 120 | public function __construct(string $className) |
|
| 12 | { |
||
| 13 | 120 | $this->className = $className; |
|
| 14 | 120 | } |
|
| 15 | |||
| 16 | /** |
||
| 17 | * @param array|null $rawArguments |
||
| 18 | * |
||
| 19 | * @return ArgumentInterface |
||
| 20 | */ |
||
| 21 | 65 | public function create(?array $rawArguments): ArgumentInterface |
|
| 22 | { |
||
| 23 | 65 | $className = $this->className; |
|
| 24 | /** @var ArgumentInterface $arguments */ |
||
| 25 | 65 | $arguments = new $className(); |
|
| 26 | 65 | $arguments->exchangeArray($rawArguments); |
|
| 27 | |||
| 28 | 65 | return $arguments; |
|
| 29 | } |
||
| 30 | |||
| 31 | 89 | public function wrapResolverArgs(callable $resolver): \Closure |
|
| 40 | 89 | }; |
|
| 41 | } |
||
| 42 | } |
||
| 43 |