Total Complexity | 5 |
Total Lines | 57 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
7 | class SelectionSetNode extends AbstractNode |
||
8 | { |
||
9 | /** |
||
10 | * @var SelectionNodeInterface[] |
||
11 | */ |
||
12 | protected $selections = []; |
||
13 | |||
14 | /** |
||
15 | * SelectionSetNode constructor. |
||
16 | * |
||
17 | * @param SelectionNodeInterface[] $selections |
||
18 | * @param Location|null $location |
||
19 | */ |
||
20 | public function __construct(array $selections, ?Location $location) |
||
25 | } |
||
26 | |||
27 | /** |
||
28 | * @return SelectionNodeInterface[] |
||
29 | */ |
||
30 | public function getSelections(): array |
||
33 | } |
||
34 | |||
35 | /** |
||
36 | * @return array |
||
37 | */ |
||
38 | public function getSelectionsAST(): array |
||
39 | { |
||
40 | return \array_map(function (SelectionNodeInterface $node) { |
||
41 | return $node->toAST(); |
||
42 | }, $this->selections); |
||
43 | } |
||
44 | |||
45 | /** |
||
46 | * @param SelectionNodeInterface[] $selections |
||
47 | * @return SelectionSetNode |
||
48 | */ |
||
49 | public function setSelections(array $selections): SelectionSetNode |
||
53 | } |
||
54 | |||
55 | /** |
||
56 | * @inheritdoc |
||
57 | */ |
||
58 | public function toAST(): array |
||
67 |