| Conditions | 2 |
| Paths | 1 |
| Total Lines | 28 |
| Code Lines | 21 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 22 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 32 | 57 | protected function _check(ArrayNodeDefinition $node): ArrayNodeDefinition |
|
| 33 | { |
||
| 34 | $node = $node |
||
| 35 | 57 | ->children() |
|
| 36 | 57 | ->arrayNode('check') |
|
| 37 | 57 | ->children() |
|
| 38 | 57 | ->arrayNode('classNames') |
|
| 39 | 57 | ->isRequired() |
|
| 40 | 57 | ->beforeNormalization() |
|
| 41 | 57 | ->ifString() |
|
| 42 | 57 | ->then(static function ($value) { |
|
| 43 | 1 | if (\is_string($value)) { |
|
| 44 | 1 | $value = [$value]; |
|
| 45 | } |
||
| 46 | |||
| 47 | 1 | return $value; |
|
| 48 | 57 | }) |
|
| 49 | 57 | ->end() |
|
| 50 | 57 | ->prototype('scalar')->end() |
|
| 51 | 57 | ->end() |
|
| 52 | 57 | ->booleanNode('autoload')->defaultTrue()->end() |
|
| 53 | 57 | ->end() |
|
| 54 | 57 | ->end() |
|
| 55 | 57 | ->end(); |
|
| 56 | |||
| 57 | 57 | $this->_addition($node); |
|
| 58 | |||
| 59 | 57 | return $node; |
|
| 60 | } |
||
| 62 |