@@ -64,17 +64,17 @@ |
||
64 | 64 | $iconData[] = $icon; |
65 | 65 | $group = HTMLNode::factory( |
66 | 66 | 'div', |
67 | - [ 'class' => "input-group mb-3" ], |
|
67 | + ['class' => "input-group mb-3"], |
|
68 | 68 | [ |
69 | 69 | HTMLNode::factory( |
70 | 70 | 'div', |
71 | - [ 'class' => "input-group-prepend" ], |
|
71 | + ['class' => "input-group-prepend"], |
|
72 | 72 | HTMLNode::factory( |
73 | 73 | 'span', |
74 | - [ 'class' => "input-group-text" ], |
|
74 | + ['class' => "input-group-text"], |
|
75 | 75 | HTMLNode::factory( |
76 | 76 | 'i', |
77 | - [ 'class' => $iconData ], |
|
77 | + ['class' => $iconData], |
|
78 | 78 | [] |
79 | 79 | ) |
80 | 80 | ) |
@@ -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\DatatypeFactory::generate( |
26 | 26 | $datatype, |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | public function toMarkdown(): string |
40 | 40 | { |
41 | 41 | $args = array_map( |
42 | - function (MetadataParameter $a) { |
|
42 | + function(MetadataParameter $a) { |
|
43 | 43 | return $a->toMarkdown(); |
44 | 44 | }, |
45 | 45 | $this->args |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | public function toGraphql(): string |
64 | 64 | { |
65 | 65 | $args = array_map( |
66 | - function (MetadataParameter $a) { |
|
66 | + function(MetadataParameter $a) { |
|
67 | 67 | return $a->toGraphql(); |
68 | 68 | }, |
69 | 69 | $this->args |
@@ -46,7 +46,7 @@ |
||
46 | 46 | 'class' => 'formularium-table__td' |
47 | 47 | ], |
48 | 48 | array_map( |
49 | - function ($i) { |
|
49 | + function($i) { |
|
50 | 50 | return HTMLNode::factory('td', [], $i); |
51 | 51 | }, |
52 | 52 | $data |
@@ -147,7 +147,7 @@ |
||
147 | 147 | public function toGraphqlTypeDefinition(): string |
148 | 148 | { |
149 | 149 | $renderable = array_map( |
150 | - function ($name, $value) { |
|
150 | + function($name, $value) { |
|
151 | 151 | $v = $value; |
152 | 152 | if (is_string($value)) { |
153 | 153 | $v = '"' . str_replace('"', '\\"', $value) . '"'; |
@@ -50,7 +50,7 @@ |
||
50 | 50 | if ($parameters[HTMLCard::LINK] ?? false) { |
51 | 51 | $titleData = HTMLNode::factory( |
52 | 52 | 'a', |
53 | - [ 'href' => $parameters[HTMLCard::LINK] ], |
|
53 | + ['href' => $parameters[HTMLCard::LINK]], |
|
54 | 54 | $parameters[HTMLCard::TITLE] |
55 | 55 | ); |
56 | 56 | } else { |
@@ -293,7 +293,7 @@ discard block |
||
293 | 293 | public function serialize(): array |
294 | 294 | { |
295 | 295 | $fields = array_map( |
296 | - function ($f) { |
|
296 | + function($f) { |
|
297 | 297 | return [ |
298 | 298 | 'datatype' => $f->getDatatype()->getName(), |
299 | 299 | 'validators' => $f->getValidators(), |
@@ -346,7 +346,7 @@ discard block |
||
346 | 346 | } |
347 | 347 | $renderables = $this->getRenderables(); |
348 | 348 | $r = array_map( |
349 | - function ($name, $value) { |
|
349 | + function($name, $value) { |
|
350 | 350 | $v = $value; |
351 | 351 | if (is_string($value)) { |
352 | 352 | $v = '"' . str_replace('"', '\\"', $value) . '"'; |
@@ -50,7 +50,7 @@ |
||
50 | 50 | if ($parameters[HTMLCard::LINK] ?? false) { |
51 | 51 | $titleData = HTMLNode::factory( |
52 | 52 | 'a', |
53 | - [ 'href' => $parameters[HTMLCard::LINK] ], |
|
53 | + ['href' => $parameters[HTMLCard::LINK]], |
|
54 | 54 | $parameters[HTMLCard::TITLE] |
55 | 55 | ); |
56 | 56 | } else { |
@@ -50,7 +50,7 @@ |
||
50 | 50 | if ($parameters[HTMLCard::LINK] ?? false) { |
51 | 51 | $titleData = HTMLNode::factory( |
52 | 52 | 'a', |
53 | - [ 'href' => $parameters[HTMLCard::LINK] ], |
|
53 | + ['href' => $parameters[HTMLCard::LINK]], |
|
54 | 54 | $parameters[HTMLCard::TITLE] |
55 | 55 | ); |
56 | 56 | } else { |