@@ -19,10 +19,10 @@ |
||
19 | 19 | protected $mode = self::VUE_MODE_EMBEDDED; |
20 | 20 | |
21 | 21 | /** |
22 | - * The tag used as container for fields in viewable() |
|
23 | - * |
|
24 | - * @var string |
|
25 | - */ |
|
22 | + * The tag used as container for fields in viewable() |
|
23 | + * |
|
24 | + * @var string |
|
25 | + */ |
|
26 | 26 | protected $viewableContainerTag = 'div'; |
27 | 27 | |
28 | 28 | /** |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | $jsonData = json_encode($data); |
219 | 219 | $props = $this->props($m); |
220 | 220 | $propsBind = array_map( |
221 | - function ($p) { |
|
221 | + function($p) { |
|
222 | 222 | return 'v-bind:' . $p . '="model.' . $p . '"'; |
223 | 223 | }, |
224 | 224 | array_keys($props) |
@@ -281,7 +281,7 @@ discard block |
||
281 | 281 | $jsonData = json_encode($data); |
282 | 282 | $props = $this->props($m); |
283 | 283 | $propsBind = array_map( |
284 | - function ($p) { |
|
284 | + function($p) { |
|
285 | 285 | return 'v-bind:' . $p . '="model.' . $p . '"'; |
286 | 286 | }, |
287 | 287 | array_keys($props) |
@@ -125,7 +125,7 @@ |
||
125 | 125 | public function serialize(): array |
126 | 126 | { |
127 | 127 | $fields = array_map( |
128 | - function ($f) { |
|
128 | + function($f) { |
|
129 | 129 | return [ |
130 | 130 | 'datatype' => $f->getDatatype()->getName(), |
131 | 131 | 'validators' => $f->getValidators(), |
@@ -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'); |
@@ -1,10 +1,10 @@ discard block |
||
1 | 1 | <?php declare(strict_types=1); |
2 | 2 | |
3 | -$shortopts = "d:p::b::t"; |
|
4 | -$longopts = array( |
|
5 | - "datatype:", // Required value |
|
3 | +$shortopts = "d:p::b::t"; |
|
4 | +$longopts = array( |
|
5 | + "datatype:", // Required value |
|
6 | 6 | "basetype::", |
7 | - "path::", // Optional value |
|
7 | + "path::", // Optional value |
|
8 | 8 | "test" |
9 | 9 | ); |
10 | 10 | $options = getopt($shortopts, $longopts); |
@@ -17,8 +17,8 @@ discard block |
||
17 | 17 | $datatypeLower = mb_strtolower($options['datatype']); |
18 | 18 | $basetype = $options['basetype'] ?? $datatypeLower; |
19 | 19 | $basetypeClass = (array_key_exists('basetype', $options) ? '\\Formularium\\Datatype\\Datatype_' . $basetype : '\\Formularium\\Datatype'); |
20 | -$path = $options['path'] ?? "Formularium/Datatype/" ; |
|
21 | -$filename = $path . "/Datatype_${datatypeLower}.php"; |
|
20 | +$path = $options['path'] ?? "Formularium/Datatype/"; |
|
21 | +$filename = $path . "/Datatype_${datatypeLower}.php"; |
|
22 | 22 | $generateTest = array_key_exists('test', $options); |
23 | 23 | |
24 | 24 | if (!is_dir($path)) { |
@@ -1,9 +1,9 @@ discard block |
||
1 | 1 | <?php declare(strict_types=1); |
2 | 2 | |
3 | -$shortopts = "v:p::t"; |
|
4 | -$longopts = array( |
|
5 | - "validator:", // Required value |
|
6 | - "path::", // Optional value |
|
3 | +$shortopts = "v:p::t"; |
|
4 | +$longopts = array( |
|
5 | + "validator:", // Required value |
|
6 | + "path::", // Optional value |
|
7 | 7 | "test" |
8 | 8 | ); |
9 | 9 | $options = getopt($shortopts, $longopts); |
@@ -15,8 +15,8 @@ discard block |
||
15 | 15 | $validator = $options['validator']; |
16 | 16 | $validatorLower = mb_strtolower($options['validator']); |
17 | 17 | $basetype = $options['basetype'] ?? $validatorLower; |
18 | -$path = $options['path'] ?? "Formularium/Validator/" ; |
|
19 | -$filename = $path . "/${validator}.php"; |
|
18 | +$path = $options['path'] ?? "Formularium/Validator/"; |
|
19 | +$filename = $path . "/${validator}.php"; |
|
20 | 20 | $generateTest = array_key_exists('test', $options); |
21 | 21 | |
22 | 22 | if (!is_dir($path)) { |
@@ -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 |
@@ -203,9 +203,9 @@ |
||
203 | 203 | 'Zero width or height' |
204 | 204 | ); |
205 | 205 | } |
206 | - $ratio = $width/$height; |
|
206 | + $ratio = $width / $height; |
|
207 | 207 | $expected = $field->getValidator(self::DIMENSION_RATIO, false); |
208 | - if (abs(($ratio-$expected)/$expected) > 0.0001) { |
|
208 | + if (abs(($ratio - $expected) / $expected) > 0.0001) { |
|
209 | 209 | throw new ValidatorException( |
210 | 210 | 'Image width/height ratio should be ' . $field->getValidator(self::DIMENSION_RATIO, false) |
211 | 211 | ); |