Conditions | 1 |
Paths | 1 |
Total Lines | 21 |
Lines | 0 |
Ratio | 0 % |
Tests | 16 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
37 | 8 | protected function addUnitMappingConfig(ArrayNodeDefinition $rootNode): self |
|
38 | { |
||
39 | // @phpstan-ignore-next-line |
||
40 | $rootNode |
||
41 | 8 | ->children() |
|
42 | 8 | ->arrayNode('mapping') |
|
43 | 8 | ->useAttributeAsKey('key')->cannotBeEmpty() |
|
44 | 8 | ->arrayPrototype() |
|
45 | 8 | ->arrayPrototype() |
|
46 | 8 | ->children() |
|
47 | 8 | ->scalarNode('unit')->cannotBeEmpty()->isRequired()->end() |
|
48 | 8 | ->floatNode('ifMoreThan')->defaultValue(0)->end() |
|
49 | 8 | ->floatNode('mod')->defaultValue(1)->end() |
|
50 | 8 | ->end() |
|
51 | 8 | ->end() |
|
52 | 8 | ->end() |
|
53 | 8 | ->end() |
|
54 | 8 | ->end(); |
|
55 | |||
56 | 8 | return $this; |
|
57 | } |
||
58 | } |
||
60 |