| Conditions | 4 |
| Paths | 4 |
| Total Lines | 17 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 37 | public static function create(array $children): self |
||
| 38 | { |
||
| 39 | $scalar = new static($children[1]); |
||
| 40 | |||
| 41 | foreach ($children as $child) { |
||
| 42 | switch (true) { |
||
| 43 | case $child instanceof Description: |
||
| 44 | $scalar->description = $child->value; |
||
| 45 | break; |
||
| 46 | |||
| 47 | case $child instanceof DirectiveNode: |
||
| 48 | $scalar->directives[] = $child; |
||
| 49 | break; |
||
| 50 | } |
||
| 51 | } |
||
| 52 | |||
| 53 | return $scalar; |
||
| 54 | } |
||
| 56 |