| Conditions | 3 |
| Paths | 4 |
| Total Lines | 16 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 28 | public function resolve(array $args = []): DefinitionInterface |
||
| 29 | { |
||
| 30 | $directive = new Directive($this->ast->name->value, [ |
||
| 31 | 'description' => $this->descriptionOf($this->ast), |
||
| 32 | 'repeatable' => $this->ast->repeatable !== null, |
||
| 33 | ]); |
||
| 34 | |||
| 35 | foreach ($this->ast->locations as $location) { |
||
| 36 | $directive->addLocation($location->name->value); |
||
| 37 | } |
||
| 38 | |||
| 39 | foreach ($this->ast->arguments as $arg) { |
||
| 40 | $directive->addArgument($this->buildArgumentDefinition($arg, $args)); |
||
| 41 | } |
||
| 42 | |||
| 43 | return $directive; |
||
| 44 | } |
||
| 46 |