Conditions | 2 |
Paths | 1 |
Total Lines | 31 |
Code Lines | 23 |
Lines | 0 |
Ratio | 0 % |
Tests | 24 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
38 | 45 | protected function _check(NodeDefinition $node): NodeDefinition |
|
39 | { |
||
40 | $node = $node |
||
41 | 45 | ->children() |
|
42 | 45 | ->arrayNode('check') |
|
43 | 45 | ->children() |
|
44 | 45 | ->arrayNode('settingName') |
|
45 | 45 | ->isRequired() |
|
46 | 45 | ->beforeNormalization() |
|
47 | 45 | ->ifString() |
|
48 | 45 | ->then(static function ($value) { |
|
49 | 1 | if (\is_string($value)) { |
|
50 | 1 | $value = [$value]; |
|
51 | } |
||
52 | |||
53 | 1 | return $value; |
|
54 | 45 | }) |
|
55 | 45 | ->end() |
|
56 | 45 | ->prototype('scalar')->end() |
|
57 | 45 | ->end() |
|
58 | 45 | ->booleanNode('expectedValue')->defaultTrue()->end() |
|
59 | 45 | ->end() |
|
60 | 45 | ->end() |
|
61 | 45 | ->end(); |
|
62 | |||
63 | 45 | $this->_group($node); |
|
64 | 45 | $this->_tags($node); |
|
65 | 45 | $this->_label($node); |
|
66 | // - "%%settingName%%" |
||
67 | // - "%%expectedValue%%" |
||
68 | 45 | return $node; |
|
69 | } |
||
71 |