Conditions | 3 |
Paths | 3 |
Total Lines | 20 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
37 | protected function buildArguments(array $arguments) |
||
38 | { |
||
39 | invariant( |
||
40 | isAssocArray($arguments), |
||
41 | 'Args must be an associative array with argument names as keys.' |
||
42 | ); |
||
43 | |||
44 | foreach ($arguments as $argumentName => $argument) { |
||
45 | $this->arguments[] = $argument instanceof Argument |
||
46 | ? $argument |
||
47 | : new Argument( |
||
48 | $argumentName, |
||
49 | $argument['type'] ?? null, |
||
50 | $argument['defaultValue'] ?? null, |
||
51 | $argument['description'] ?? null, |
||
52 | $argument['astNode'] ?? null |
||
53 | ); |
||
54 | } |
||
55 | |||
56 | return $this; |
||
57 | } |
||
59 |