| Total Complexity | 4 |
| Total Lines | 42 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | trait InputArgumentsTrait |
||
| 8 | { |
||
| 9 | |||
| 10 | /** |
||
| 11 | * @var InputValueDefinitionNode[] |
||
| 12 | */ |
||
| 13 | protected $arguments; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @return bool |
||
| 17 | */ |
||
| 18 | public function hasArguments(): bool |
||
| 19 | { |
||
| 20 | return !empty($this->arguments); |
||
| 21 | } |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @return InputValueDefinitionNode[] |
||
| 25 | */ |
||
| 26 | public function getArguments(): array |
||
| 27 | { |
||
| 28 | return $this->arguments ?? []; |
||
| 29 | } |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @return array |
||
| 33 | */ |
||
| 34 | public function getArgumentsAsArray(): array |
||
| 39 | } |
||
| 40 | |||
| 41 | /** |
||
| 42 | * @param array|InputValueDefinitionNode[] $arguments |
||
| 43 | * @return $this |
||
| 44 | */ |
||
| 45 | public function setArguments(array $arguments) |
||
| 49 | } |
||
| 50 | } |
||
| 51 |