@@ -77,7 +77,7 @@ |
||
77 | 77 | /** |
78 | 78 | * @var Framework $framework |
79 | 79 | */ |
80 | - $f =$framework->getName(); |
|
80 | + $f = $framework->getName(); |
|
81 | 81 | if ($f === 'HTML' || $f === 'Vue') { |
82 | 82 | continue; |
83 | 83 | } |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | 'Table', |
38 | 38 | [ |
39 | 39 | Table::ROW_NAMES => ['First', 'Second', 'Third'], |
40 | - Table::ROW_DATA => [ ['a', 'b', 'c'], [ 'd', 'e', 'f'] ], |
|
40 | + Table::ROW_DATA => [['a', 'b', 'c'], ['d', 'e', 'f']], |
|
41 | 41 | Table::STRIPED => true |
42 | 42 | ] |
43 | 43 | ); |
@@ -65,10 +65,10 @@ discard block |
||
65 | 65 | |
66 | 66 | return '<h3 class="kitchen">Upload</h3>' . $upload . "\n" . |
67 | 67 | '<h3 class="kitchen">Button</h3>' . $submitButton . "\n" . |
68 | - '<h3 class="kitchen">Table</h3>' . $table . "\n" . |
|
69 | - '<h3 class="kitchen">Pagination</h3>' . $pagination . "\n" . |
|
70 | - '<h3 class="kitchen">Card</h3><div style="width: 180px">' . $card . "</div>\n" . |
|
71 | - '<h3 class="kitchen">Spinner</h3><div>'. $spinner . "</div>\n"; |
|
68 | + '<h3 class="kitchen">Table</h3>' . $table . "\n" . |
|
69 | + '<h3 class="kitchen">Pagination</h3>' . $pagination . "\n" . |
|
70 | + '<h3 class="kitchen">Card</h3><div style="width: 180px">' . $card . "</div>\n" . |
|
71 | + '<h3 class="kitchen">Spinner</h3><div>' . $spinner . "</div>\n"; |
|
72 | 72 | } |
73 | 73 | |
74 | 74 | function kitchenSink($frameworkName, string $templateName) |
@@ -105,8 +105,8 @@ discard block |
||
105 | 105 | 'myString' => [ |
106 | 106 | 'datatype' => 'string', |
107 | 107 | 'validators' => [ |
108 | - MinLength::class => [ 'value' => 3], |
|
109 | - MaxLength::class => [ 'value' => 30], |
|
108 | + MinLength::class => ['value' => 3], |
|
109 | + MaxLength::class => ['value' => 30], |
|
110 | 110 | ], |
111 | 111 | 'renderable' => [ |
112 | 112 | Renderable::LABEL => 'Type string', |
@@ -120,8 +120,8 @@ discard block |
||
120 | 120 | 'myInteger' => [ |
121 | 121 | 'datatype' => 'integer', |
122 | 122 | 'validators' => [ |
123 | - Min::class => [ 'value' => 4], |
|
124 | - Max::class => [ 'value' => 40], |
|
123 | + Min::class => ['value' => 4], |
|
124 | + Max::class => ['value' => 40], |
|
125 | 125 | ], |
126 | 126 | 'renderable' => [ |
127 | 127 | Renderable_number::STEP => 2, |
@@ -20,7 +20,7 @@ |
||
20 | 20 | ], |
21 | 21 | HTMLNode::factory( |
22 | 22 | 'span', |
23 | - [ 'class' => "sr-only" ], |
|
23 | + ['class' => "sr-only"], |
|
24 | 24 | 'Loading...' |
25 | 25 | ) |
26 | 26 | ); |
@@ -20,7 +20,7 @@ |
||
20 | 20 | ], |
21 | 21 | HTMLNode::factory( |
22 | 22 | 'span', |
23 | - [ 'class' => "sr-only" ], |
|
23 | + ['class' => "sr-only"], |
|
24 | 24 | 'Loading...' |
25 | 25 | ) |
26 | 26 | ); |
@@ -103,7 +103,7 @@ |
||
103 | 103 | public static function getNames(): array |
104 | 104 | { |
105 | 105 | return static::map( |
106 | - function (\ReflectionClass $reflection) { |
|
106 | + function(\ReflectionClass $reflection) { |
|
107 | 107 | return static::getNamePair($reflection); |
108 | 108 | } |
109 | 109 | ); |
@@ -35,7 +35,7 @@ |
||
35 | 35 | function datatypes() |
36 | 36 | { |
37 | 37 | $markdown = DatatypeFactory::map( |
38 | - function (\ReflectionClass $reflection): array { |
|
38 | + function(\ReflectionClass $reflection): array { |
|
39 | 39 | $class = $reflection->getName(); |
40 | 40 | |
41 | 41 | /** |
@@ -30,11 +30,11 @@ |
||
30 | 30 | public function getExtradataSerialize(): array |
31 | 31 | { |
32 | 32 | return array_map( |
33 | - function (Extradata $e) { |
|
33 | + function(Extradata $e) { |
|
34 | 34 | return [ |
35 | 35 | 'name' => $e->getName(), |
36 | 36 | 'args' => array_map( |
37 | - function (ExtradataParameter $a) { |
|
37 | + function(ExtradataParameter $a) { |
|
38 | 38 | return [ |
39 | 39 | 'name' => $a->name, |
40 | 40 | 'value' => $a->value |
@@ -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 | ) |
@@ -6,7 +6,7 @@ discard block |
||
6 | 6 | |
7 | 7 | $shortopts = "v:p::t::"; |
8 | 8 | $longopts = array( |
9 | - "validator:", // Required value |
|
9 | + "validator:", // Required value |
|
10 | 10 | "namespace::", |
11 | 11 | "path::", |
12 | 12 | "test-path::" |
@@ -19,8 +19,8 @@ discard block |
||
19 | 19 | |
20 | 20 | $validator = $options['validator']; |
21 | 21 | $namespace = $options['namespace'] ?? 'Formularium\\Validator'; |
22 | -$path = $options['path'] ?? "Formularium/Validator/" ; |
|
23 | -$testpath = $options['testpath'] ?? "tests/Validator" ; |
|
22 | +$path = $options['path'] ?? "Formularium/Validator/"; |
|
23 | +$testpath = $options['testpath'] ?? "tests/Validator"; |
|
24 | 24 | |
25 | 25 | $code = ValidatorFactory::generate( |
26 | 26 | $validator, |