Conditions | 3 |
Paths | 3 |
Total Lines | 15 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 3 | ||
Bugs | 0 | Features | 1 |
1 | <?php namespace Anomaly\Streams\Platform\Ui\Form\Component\Section; |
||
21 | public function normalize(FormBuilder $builder) |
||
22 | { |
||
23 | $sections = $builder->getSections(); |
||
24 | |||
25 | foreach ($sections as $slug => &$section) { |
||
26 | |||
27 | if (is_string($section)) { |
||
28 | $section = [ |
||
29 | 'view' => $section |
||
30 | ]; |
||
31 | } |
||
32 | } |
||
33 | |||
34 | $builder->setSections($sections); |
||
35 | } |
||
36 | } |
||
37 |