@@ -11,14 +11,14 @@ |
||
11 | 11 | |
12 | 12 | public function viewableCompose(\Formularium\Model $m, array $elements, string $previousCompose): string |
13 | 13 | { |
14 | - return join('', array_map(function ($e) { |
|
14 | + return join('', array_map(function($e) { |
|
15 | 15 | return $e->__toString(); |
16 | 16 | }, $elements)); |
17 | 17 | } |
18 | 18 | |
19 | 19 | public function editableCompose(\Formularium\Model $m, array $elements, string $previousCompose): string |
20 | 20 | { |
21 | - return join('', array_map(function ($e) { |
|
21 | + return join('', array_map(function($e) { |
|
22 | 22 | return $e->__toString(); |
23 | 23 | }, $elements)); |
24 | 24 | } |
@@ -27,7 +27,7 @@ |
||
27 | 27 | { |
28 | 28 | // add extra classes |
29 | 29 | $previous->walk( |
30 | - function ($e) { |
|
30 | + function($e) { |
|
31 | 31 | if ($e instanceof HTMLElement) { |
32 | 32 | if ($e->getTag() === 'input') { |
33 | 33 | $e->setTag('b-datepicker'); |
@@ -14,7 +14,7 @@ |
||
14 | 14 | |
15 | 15 | public function editable($value, Field $field, HTMLElement $previous): HTMLElement |
16 | 16 | { |
17 | - $previous->walk(function (HTMLElement $element) use ($field) { |
|
17 | + $previous->walk(function(HTMLElement $element) use ($field) { |
|
18 | 18 | if ($element->getTag() === 'input') { |
19 | 19 | if ($element->getAttribute('type') === ['checkbox']) { |
20 | 20 | $element->setAttribute('checked', "{this.state.{$field->getName()}}"); |
@@ -27,7 +27,7 @@ |
||
27 | 27 | { |
28 | 28 | // add extra classes |
29 | 29 | $previous->walk( |
30 | - function ($e) { |
|
30 | + function($e) { |
|
31 | 31 | if ($e instanceof HTMLElement) { |
32 | 32 | if ($e->getTag() === 'input') { |
33 | 33 | $e->setTag('b-datetimepicker'); |
@@ -32,7 +32,7 @@ |
||
32 | 32 | if (array_key_exists(Renderable::COMMENT, $extensions)) { |
33 | 33 | $base->setAttribute('message', $extensions[Renderable::COMMENT]); |
34 | 34 | } |
35 | - $base->filter(function ($e) { |
|
35 | + $base->filter(function($e) { |
|
36 | 36 | if ($e instanceof HTMLElement) { |
37 | 37 | if ($e->getTag() === 'label') { |
38 | 38 | return false; |
@@ -34,7 +34,7 @@ |
||
34 | 34 | $label = $base->get('label.formularium-label'); |
35 | 35 | if (!empty($label)) { |
36 | 36 | // delete |
37 | - $base->filter(function ($e) { |
|
37 | + $base->filter(function($e) { |
|
38 | 38 | return !($e->getTag() === 'label' && $e->getAttribute('class') === ['formularium-label']); |
39 | 39 | }); |
40 | 40 | // fix class |
@@ -27,7 +27,7 @@ |
||
27 | 27 | { |
28 | 28 | // add extra classes |
29 | 29 | $previous->walk( |
30 | - function ($e) use ($field) { |
|
30 | + function($e) use ($field) { |
|
31 | 31 | if ($e instanceof HTMLElement) { |
32 | 32 | if ($e->getTag() === 'input') { |
33 | 33 | if (($e->getAttribute('type')[0] ?? '') === 'radio') { |
@@ -56,11 +56,11 @@ |
||
56 | 56 | $iconData[] = $icon; |
57 | 57 | $iconElement = HTMLElement::factory( |
58 | 58 | 'span', |
59 | - [ 'class' => "icon is-small is-left" ], |
|
59 | + ['class' => "icon is-small is-left"], |
|
60 | 60 | [ |
61 | 61 | HTMLElement::factory( |
62 | 62 | 'i', |
63 | - [ 'class' => $iconData ], |
|
63 | + ['class' => $iconData], |
|
64 | 64 | [] |
65 | 65 | ) |
66 | 66 | ] |
@@ -56,17 +56,17 @@ |
||
56 | 56 | $iconData[] = $icon; |
57 | 57 | $group = HTMLElement::factory( |
58 | 58 | 'div', |
59 | - [ 'class' => "input-group mb-3" ], |
|
59 | + ['class' => "input-group mb-3"], |
|
60 | 60 | [ |
61 | 61 | HTMLElement::factory( |
62 | 62 | 'div', |
63 | - [ 'class' => "input-group-prepend" ], |
|
63 | + ['class' => "input-group-prepend"], |
|
64 | 64 | HTMLElement::factory( |
65 | 65 | 'span', |
66 | - [ 'class' => "input-group-text" ], |
|
66 | + ['class' => "input-group-text"], |
|
67 | 67 | HTMLElement::factory( |
68 | 68 | 'i', |
69 | - [ 'class' => $iconData ], |
|
69 | + ['class' => $iconData], |
|
70 | 70 | [] |
71 | 71 | ) |
72 | 72 | ) |