@@ -4,7 +4,7 @@ discard block |
||
| 4 | 4 | |
| 5 | 5 | $shortopts = "v:p::t::"; |
| 6 | 6 | $longopts = array( |
| 7 | - "validator:", // Required value |
|
| 7 | + "validator:", // Required value |
|
| 8 | 8 | "namespace::", |
| 9 | 9 | "path::", |
| 10 | 10 | "test-path::" |
@@ -17,8 +17,8 @@ discard block |
||
| 17 | 17 | |
| 18 | 18 | $validator = $options['validator']; |
| 19 | 19 | $namespace = $options['namespace'] ?? 'Formularium\\Validator'; |
| 20 | -$path = $options['path'] ?? "Formularium/Validator/" ; |
|
| 21 | -$testpath = $options['testpath'] ?? "tests/Validator" ; |
|
| 20 | +$path = $options['path'] ?? "Formularium/Validator/"; |
|
| 21 | +$testpath = $options['testpath'] ?? "tests/Validator"; |
|
| 22 | 22 | |
| 23 | 23 | $code = \Formularium\ValidatorFactory::generate( |
| 24 | 24 | $validator, |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | $atts, |
| 117 | 117 | join( |
| 118 | 118 | '', |
| 119 | - array_map(function ($e) { |
|
| 119 | + array_map(function($e) { |
|
| 120 | 120 | return $e->__toString(); |
| 121 | 121 | }, $elements) |
| 122 | 122 | ), |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | |
| 127 | 127 | public function editableCompose(\Formularium\Model $m, array $elements, string $previousCompose): string |
| 128 | 128 | { |
| 129 | - return join('', array_map(function ($e) { |
|
| 129 | + return join('', array_map(function($e) { |
|
| 130 | 130 | return $e->__toString(); |
| 131 | 131 | }, $elements)); |
| 132 | 132 | } |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | */ |
| 26 | 26 | public function fix($value, Field $field, HTMLNode $previous): HTMLNode |
| 27 | 27 | { |
| 28 | - $previous->walk(function (HTMLNode $element) use ($field) { |
|
| 28 | + $previous->walk(function(HTMLNode $element) use ($field) { |
|
| 29 | 29 | if ($element->getTag() === 'input') { |
| 30 | 30 | if ($element->getAttribute('type') === ['checkbox']) { |
| 31 | 31 | $element->setAttribute('checked', "{this.state.{$field->getName()}}"); |
@@ -15,7 +15,7 @@ |
||
| 15 | 15 | public function editable($value, Field $field, HTMLNode $previous): HTMLNode |
| 16 | 16 | { |
| 17 | 17 | $previous->filter( |
| 18 | - function ($e) { |
|
| 18 | + function($e) { |
|
| 19 | 19 | if ($e->getTag() === 'canvas') { |
| 20 | 20 | return false; |
| 21 | 21 | } |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | if ($icon) { |
| 26 | 26 | $iconElement = HTMLNode::factory( |
| 27 | 27 | 'i', |
| 28 | - [ 'class' => "material-icons left" ], |
|
| 28 | + ['class' => "material-icons left"], |
|
| 29 | 29 | $icon |
| 30 | 30 | ); |
| 31 | 31 | $previous->prependContent($iconElement); |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | [ |
| 41 | 41 | HTMLNode::factory( |
| 42 | 42 | 'i', |
| 43 | - [ 'class' => $iconData ], |
|
| 43 | + ['class' => $iconData], |
|
| 44 | 44 | [] |
| 45 | 45 | ) |
| 46 | 46 | ] |
@@ -56,11 +56,11 @@ |
||
| 56 | 56 | $iconData[] = $icon; |
| 57 | 57 | $iconElement = HTMLNode::factory( |
| 58 | 58 | 'span', |
| 59 | - [ 'class' => "icon is-small is-left" ], |
|
| 59 | + ['class' => "icon is-small is-left"], |
|
| 60 | 60 | [ |
| 61 | 61 | HTMLNode::factory( |
| 62 | 62 | 'i', |
| 63 | - [ 'class' => $iconData ], |
|
| 63 | + ['class' => $iconData], |
|
| 64 | 64 | [] |
| 65 | 65 | ) |
| 66 | 66 | ] |
@@ -53,7 +53,7 @@ |
||
| 53 | 53 | ['class' => "file-icon"], |
| 54 | 54 | HTMLNode::factory( |
| 55 | 55 | 'i', |
| 56 | - [ 'class' => "fas fa-upload" ] |
|
| 56 | + ['class' => "fas fa-upload"] |
|
| 57 | 57 | ) |
| 58 | 58 | ), |
| 59 | 59 | HTMLNode::factory( |
@@ -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 HTMLNode) { |
| 32 | 32 | if ($e->getTag() === 'input') { |
| 33 | 33 | if (($e->getAttribute('type')[0] ?? '') === 'radio') { |