Total Complexity | 5 |
Total Lines | 68 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
10 | trait ArgumentsTrait |
||
11 | { |
||
12 | /** |
||
13 | * @var array |
||
14 | */ |
||
15 | protected $rawArguments = []; |
||
16 | |||
17 | /** |
||
18 | * @var Argument[] |
||
19 | */ |
||
20 | protected $arguments; |
||
21 | |||
22 | /** |
||
23 | * @return null|string |
||
24 | */ |
||
25 | public abstract function getName(): ?string; |
||
26 | |||
27 | /** |
||
28 | * @return array |
||
29 | */ |
||
30 | public function getRawArguments(): array |
||
31 | { |
||
32 | return $this->rawArguments; |
||
33 | } |
||
34 | |||
35 | /** |
||
36 | * @return bool |
||
37 | */ |
||
38 | public function hasArguments(): bool |
||
39 | { |
||
40 | return !empty($this->arguments); |
||
41 | } |
||
42 | |||
43 | /** |
||
44 | * @return Argument[] |
||
45 | * @throws InvariantException |
||
46 | */ |
||
47 | public function getArguments(): array |
||
50 | } |
||
51 | |||
52 | /** |
||
53 | * @param string $typeName |
||
54 | * @param array $rawArguments |
||
55 | * @return Argument[] |
||
56 | * @throws InvariantException |
||
57 | */ |
||
58 | protected function buildArguments(string $typeName, array $rawArguments): array |
||
78 | } |
||
79 | } |
||
80 |