@@ -52,8 +52,8 @@ discard block |
||
| 52 | 52 | 'myString' => [ |
| 53 | 53 | 'datatype' => 'string', |
| 54 | 54 | 'validators' => [ |
| 55 | - MinLength::class => [ 'value' => 3], |
|
| 56 | - MaxLength::class => [ 'value' => 30], |
|
| 55 | + MinLength::class => ['value' => 3], |
|
| 56 | + MaxLength::class => ['value' => 30], |
|
| 57 | 57 | ], |
| 58 | 58 | 'renderable' => [ |
| 59 | 59 | Renderable::LABEL => 'Type string', |
@@ -67,8 +67,8 @@ discard block |
||
| 67 | 67 | 'myInteger' => [ |
| 68 | 68 | 'datatype' => 'integer', |
| 69 | 69 | 'validators' => [ |
| 70 | - Min::class => [ 'value' => 4], |
|
| 71 | - Max::class => [ 'value' => 40], |
|
| 70 | + Min::class => ['value' => 4], |
|
| 71 | + Max::class => ['value' => 40], |
|
| 72 | 72 | ], |
| 73 | 73 | 'renderable' => [ |
| 74 | 74 | Renderable_number::STEP => 2, |
@@ -2,9 +2,9 @@ discard block |
||
| 2 | 2 | |
| 3 | 3 | require('vendor/autoload.php'); |
| 4 | 4 | |
| 5 | -$shortopts = "v:p::t::"; |
|
| 6 | -$longopts = array( |
|
| 7 | - "validator:", // Required value |
|
| 5 | +$shortopts = "v:p::t::"; |
|
| 6 | +$longopts = array( |
|
| 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\Datatype'; |
| 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, |
@@ -61,12 +61,12 @@ |
||
| 61 | 61 | [], |
| 62 | 62 | HTMLElement::factory( |
| 63 | 63 | 'b-icon', |
| 64 | - [ 'icon' => "upload", 'size' => "is-large" ] |
|
| 64 | + ['icon' => "upload", 'size' => "is-large"] |
|
| 65 | 65 | ) |
| 66 | 66 | ), |
| 67 | 67 | HTMLElement::factory( |
| 68 | 68 | 'p', |
| 69 | - [ 'class' => 'formularium-label'], |
|
| 69 | + ['class' => 'formularium-label'], |
|
| 70 | 70 | $renderable[Renderable::LABEL] ?? '' |
| 71 | 71 | ) |
| 72 | 72 | ] |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | if (array_key_exists(Renderable::COMMENT, $renderable)) { |
| 33 | 33 | $base->setAttribute('message', $renderable[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; |