We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| @@ 16-33 (lines=18) @@ | ||
| 13 | ||
| 14 | use Symfony\Component\Config\Definition\Builder\TreeBuilder; |
|
| 15 | ||
| 16 | class CustomScalarTypeDefinition extends TypeDefinition |
|
| 17 | { |
|
| 18 | public function getDefinition() |
|
| 19 | { |
|
| 20 | $builder = new TreeBuilder(); |
|
| 21 | $node = $builder->root('_custom_scalar_config'); |
|
| 22 | ||
| 23 | $node |
|
| 24 | ->children() |
|
| 25 | ->append($this->nameSection()) |
|
| 26 | ->variableNode('serialize')->isRequired()->end() |
|
| 27 | ->variableNode('parseValue')->isRequired()->end() |
|
| 28 | ->variableNode('parseLiteral')->isRequired()->end() |
|
| 29 | ->end(); |
|
| 30 | ||
| 31 | return $node; |
|
| 32 | } |
|
| 33 | } |
|
| 34 | ||
| @@ 16-39 (lines=24) @@ | ||
| 13 | ||
| 14 | use Symfony\Component\Config\Definition\Builder\TreeBuilder; |
|
| 15 | ||
| 16 | class UnionTypeDefinition extends TypeDefinition |
|
| 17 | { |
|
| 18 | public function getDefinition() |
|
| 19 | { |
|
| 20 | $builder = new TreeBuilder(); |
|
| 21 | $node = $builder->root('_union_config'); |
|
| 22 | ||
| 23 | $node |
|
| 24 | ->children() |
|
| 25 | ->append($this->nameSection()) |
|
| 26 | ->arrayNode('types') |
|
| 27 | ->prototype('scalar') |
|
| 28 | ->info('One or more of object types.') |
|
| 29 | ->end() |
|
| 30 | ->isRequired() |
|
| 31 | ->requiresAtLeastOneElement() |
|
| 32 | ->end() |
|
| 33 | ->append($this->resolveTypeSection()) |
|
| 34 | ->append($this->descriptionSection()) |
|
| 35 | ->end(); |
|
| 36 | ||
| 37 | return $node; |
|
| 38 | } |
|
| 39 | } |
|
| 40 | ||