| @@ -120,7 +120,7 @@ discard block | ||
| 120 | 120 | $atts, | 
| 121 | 121 | join( | 
| 122 | 122 | '', | 
| 123 | -                array_map(function ($e) { | |
| 123 | +                array_map(function($e) { | |
| 124 | 124 | return $e->__toString(); | 
| 125 | 125 | }, $elements) | 
| 126 | 126 | ), | 
| @@ -130,7 +130,7 @@ discard block | ||
| 130 | 130 | |
| 131 | 131 | public function editableCompose(\Formularium\Model $m, array $elements, string $previousCompose, FrameworkComposer $composer): string | 
| 132 | 132 |      { | 
| 133 | -        return join('', array_map(function ($e) { | |
| 133 | +        return join('', array_map(function($e) { | |
| 134 | 134 | return $e->__toString(); | 
| 135 | 135 | }, $elements)); | 
| 136 | 136 | } | 
| @@ -27,7 +27,7 @@ discard block | ||
| 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') { | 
| @@ -89,7 +89,7 @@ discard block | ||
| 89 | 89 | |
| 90 | 90 | $options = []; | 
| 91 | 91 | $select->walk( | 
| 92 | -            function (HTMLNode $e) use (&$options) { | |
| 92 | +            function(HTMLNode $e) use (&$options) { | |
| 93 | 93 |                  if ($e->getTag() == 'option') { | 
| 94 | 94 |                      $idx = $e->getAttribute('value')[0] ?? ''; | 
| 95 | 95 | $text = $e->getContent()[0] ?? ''; | 
| @@ -28,7 +28,7 @@ | ||
| 28 | 28 |      { | 
| 29 | 29 | // add extra classes | 
| 30 | 30 | $previous->walk( | 
| 31 | -            function ($e) { | |
| 31 | +            function($e) { | |
| 32 | 32 |                  if ($e instanceof HTMLNode) { | 
| 33 | 33 |                      if ($e->getTag() === 'input') { | 
| 34 | 34 |                          $e->setTag('v-time-picker'); | 
| @@ -29,7 +29,7 @@ | ||
| 29 | 29 |      { | 
| 30 | 30 | // add extra classes | 
| 31 | 31 | $previous->walk( | 
| 32 | -            function ($e) { | |
| 32 | +            function($e) { | |
| 33 | 33 |                  if ($e instanceof HTMLNode) { | 
| 34 | 34 |                      if ($e->getTag() === 'input') { | 
| 35 | 35 |                          $e->setTag('v-color-picker'); | 
| @@ -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 HTMLNode) { | 
| 32 | 32 |                      if ($e->getTag() === 'input') { | 
| 33 | 33 |                          $e->setTag('v-date-picker'); | 
| @@ -23,7 +23,7 @@ | ||
| 23 | 23 | /** @var HTMLNode $base */ | 
| 24 | 24 | $base = $this->_editable($value, $field, $previous); | 
| 25 | 25 | |
| 26 | -        $base->filter(function ($e) { | |
| 26 | +        $base->filter(function($e) { | |
| 27 | 27 |              if ($e instanceof HTMLNode) { | 
| 28 | 28 |                  if ($e->getTag() === 'label') { | 
| 29 | 29 | return false; | 
| @@ -29,7 +29,7 @@ discard block | ||
| 29 | 29 | $frameworkNames = join( | 
| 30 | 30 | '/', | 
| 31 | 31 | array_map( | 
| 32 | -            function (Framework $f) { | |
| 32 | +            function(Framework $f) { | |
| 33 | 33 | return $f->getName(); | 
| 34 | 34 | }, | 
| 35 | 35 | $frameworkComposer->getFrameworks() | 
| @@ -61,8 +61,8 @@ discard block | ||
| 61 | 61 | 'myString' => [ | 
| 62 | 62 | 'datatype' => 'string', | 
| 63 | 63 | 'validators' => [ | 
| 64 | - MinLength::class => [ 'value' => 3], | |
| 65 | - MaxLength::class => [ 'value' => 30], | |
| 64 | + MinLength::class => ['value' => 3], | |
| 65 | + MaxLength::class => ['value' => 30], | |
| 66 | 66 | ], | 
| 67 | 67 | 'renderable' => [ | 
| 68 | 68 | Renderable::LABEL => 'Type string', | 
| @@ -76,8 +76,8 @@ discard block | ||
| 76 | 76 | 'myInteger' => [ | 
| 77 | 77 | 'datatype' => 'integer', | 
| 78 | 78 | 'validators' => [ | 
| 79 | - Min::class => [ 'value' => 4], | |
| 80 | - Max::class => [ 'value' => 40], | |
| 79 | + Min::class => ['value' => 4], | |
| 80 | + Max::class => ['value' => 40], | |
| 81 | 81 | ], | 
| 82 | 82 | 'renderable' => [ | 
| 83 | 83 | Renderable_number::STEP => 2, | 
| @@ -124,7 +124,7 @@ discard block | ||
| 124 | 124 | 'Table', | 
| 125 | 125 | [ | 
| 126 | 126 | Table::ROW_NAMES => ['First', 'Second', 'Third'], | 
| 127 | - Table::ROW_DATA => [ ['a', 'b', 'c'], [ 'd', 'e', 'f'] ], | |
| 127 | + Table::ROW_DATA => [['a', 'b', 'c'], ['d', 'e', 'f']], | |
| 128 | 128 | Table::STRIPED => true | 
| 129 | 129 | ] | 
| 130 | 130 | ); | 
| @@ -152,10 +152,10 @@ discard block | ||
| 152 | 152 | |
| 153 | 153 | $contents = '<h3 class="kitchen">Upload</h3>' . $upload . "\n" . | 
| 154 | 154 | '<h3 class="kitchen">Button</h3>' . $submitButton . "\n" . | 
| 155 | - '<h3 class="kitchen">Table</h3>' . $table . "\n" . | |
| 156 | - '<h3 class="kitchen">Pagination</h3>' . $pagination . "\n" . | |
| 157 | - '<h3 class="kitchen">Card</h3><div style="width: 180px">' . $card . "</div>\n" . | |
| 158 | - '<h3 class="kitchen">Spinner</h3><div>'. $spinner . "</div>\n"; | |
| 155 | + '<h3 class="kitchen">Table</h3>' . $table . "\n" . | |
| 156 | + '<h3 class="kitchen">Pagination</h3>' . $pagination . "\n" . | |
| 157 | + '<h3 class="kitchen">Card</h3><div style="width: 180px">' . $card . "</div>\n" . | |
| 158 | + '<h3 class="kitchen">Spinner</h3><div>' . $spinner . "</div>\n"; | |
| 159 | 159 | |
| 160 | 160 | return templatify($frameworkComposer, $templateName, $contents, 'Elements'); | 
| 161 | 161 | } |