@@ -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 | $extensions[Renderable::LABEL] ?? '' |
| 71 | 71 | ) |
| 72 | 72 | ] |
@@ -45,7 +45,7 @@ |
||
| 45 | 45 | ['class' => "file-icon"], |
| 46 | 46 | HTMLElement::factory( |
| 47 | 47 | 'i', |
| 48 | - [ 'class' => "fas fa-upload" ] |
|
| 48 | + ['class' => "fas fa-upload"] |
|
| 49 | 49 | ) |
| 50 | 50 | ), |
| 51 | 51 | HTMLElement::factory( |
@@ -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-clockpicker'); |
@@ -11,7 +11,7 @@ |
||
| 11 | 11 | public const RELATIONSHIP = "RELATIONSHIP"; |
| 12 | 12 | public const RELATIONSHIP_ONE_TO_ONE = "RELATIONSHIP_ONE_TO_ONE"; |
| 13 | 13 | public const RELATIONSHIP_ONE_TO_MANY = "RELATIONSHIP_ONE_TO_MANY"; |
| 14 | - public const RELATIONSHIP_MANY_TO_MANY = "RELATIONSHIP_MANY_TO_MANY"; |
|
| 14 | + public const RELATIONSHIP_MANY_TO_MANY = "RELATIONSHIP_MANY_TO_MANY"; |
|
| 15 | 15 | |
| 16 | 16 | /** |
| 17 | 17 | * @var string |
@@ -15,7 +15,7 @@ |
||
| 15 | 15 | public function editable($value, Field $field, HTMLElement $previous): HTMLElement |
| 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 | */ |
| 26 | 26 | public function fix($value, Field $field, HTMLElement $previous): HTMLElement |
| 27 | 27 | { |
| 28 | - $previous->walk(function (HTMLElement $element) use ($field) { |
|
| 28 | + $previous->walk(function(HTMLElement $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()}}"); |
@@ -30,7 +30,7 @@ |
||
| 30 | 30 | public function toGraphql(): string |
| 31 | 31 | { |
| 32 | 32 | $args = array_map( |
| 33 | - function (ValidatorArgs $a) { |
|
| 33 | + function(ValidatorArgs $a) { |
|
| 34 | 34 | return $a->toGraphql(); |
| 35 | 35 | }, |
| 36 | 36 | $this->args |
@@ -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 | 'extensions' => [ |
| 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 | 'extensions' => [ |
| 74 | 74 | Renderable_number::STEP => 2, |
@@ -2,9 +2,9 @@ discard block |
||
| 2 | 2 | |
| 3 | 3 | require('vendor/autoload.php'); |
| 4 | 4 | |
| 5 | -$shortopts = "d:b::n::p::t::"; |
|
| 6 | -$longopts = array( |
|
| 7 | - "datatype:", // Required value |
|
| 5 | +$shortopts = "d:b::n::p::t::"; |
|
| 6 | +$longopts = array( |
|
| 7 | + "datatype:", // Required value |
|
| 8 | 8 | "basetype::", |
| 9 | 9 | "namespace::", |
| 10 | 10 | "path::", |
@@ -19,8 +19,8 @@ discard block |
||
| 19 | 19 | $datatype = $options['datatype']; |
| 20 | 20 | $basetype = $options['basetype'] ?? ''; |
| 21 | 21 | $namespace = $options['namespace'] ?? 'Formularium\Datatype'; |
| 22 | -$path = $options['path'] ?? "Formularium/Datatype/" ; |
|
| 23 | -$testpath = $options['testpath'] ?? "tests/Datatype" ; |
|
| 22 | +$path = $options['path'] ?? "Formularium/Datatype/"; |
|
| 23 | +$testpath = $options['testpath'] ?? "tests/Datatype"; |
|
| 24 | 24 | |
| 25 | 25 | $code = \Formularium\Datatype::generate( |
| 26 | 26 | $datatype, |