Passed
Push — master ( 05853d...d86905 )
by Bruno
05:51
created
Formularium/Frontend/Bulma/RenderableBulmaTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
         $label = $base->get('label.formularium-label');
35 35
         if (!empty($label)) {
36 36
             // delete
37
-            $base->filter(function ($e) {
37
+            $base->filter(function($e) {
38 38
                 return !($e->getTag() === 'label' && $e->getAttribute('class') === ['formularium-label']);
39 39
             });
40 40
             // fix class
Please login to merge, or discard this patch.
Formularium/Frontend/Vue/Framework.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,10 +19,10 @@
 block discarded – undo
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
     /**
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
 
213 213
     protected function serializeProps(array $props): string
214 214
     {
215
-        $s = array_map(function ($name, $p) {
215
+        $s = array_map(function($name, $p) {
216 216
             return "'$name': { 'type': {$p['type']}" . ($p['required'] ?? false ? ", 'required': true" : '') . " } ";
217 217
         }, array_keys($props), $props);
218 218
         return "{\n        " . implode(",\n        ", $s) . "\n    }\n";
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
         $jsonData = json_encode($data);
227 227
         $props = $this->props($m);
228 228
         $propsBind = array_map(
229
-            function ($p) {
229
+            function($p) {
230 230
                 return 'v-bind:' . $p . '="model.' . $p . '"';
231 231
             },
232 232
             array_keys($props)
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
         $jsonData = json_encode($data);
290 290
         $props = $this->props($m);
291 291
         $propsBind = array_map(
292
-            function ($p) {
292
+            function($p) {
293 293
                 return 'v-bind:' . $p . '="model.' . $p . '"';
294 294
             },
295 295
             array_keys($props)
Please login to merge, or discard this patch.
Formularium/Model.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -125,7 +125,7 @@
 block discarded – undo
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(),
Please login to merge, or discard this patch.
Formularium/Validator/Image.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -85,9 +85,9 @@
 block discarded – undo
85 85
                     'Zero width or height'
86 86
                 );
87 87
             }
88
-            $ratio = $width/$height;
88
+            $ratio = $width / $height;
89 89
             $expected = $ratio;
90
-            if (abs(($ratio-$expected)/$expected) > 0.0001) {
90
+            if (abs(($ratio - $expected) / $expected) > 0.0001) {
91 91
                 throw new ValidatorException(
92 92
                     'Image width/height ratio should be ' . $ratio
93 93
                 );
Please login to merge, or discard this patch.
util/makeKitchenSink.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -52,8 +52,8 @@  discard block
 block discarded – undo
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
 block discarded – undo
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,
Please login to merge, or discard this patch.
Formularium/DatatypeFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -252,7 +252,7 @@
 block discarded – undo
252 252
     
253 253
         $datatype = $codeData['datatype'];
254 254
         $retval = [];
255
-        $filename =  $path . "/Datatype_{$codeData['datatypeLower']}.php";
255
+        $filename = $path . "/Datatype_{$codeData['datatypeLower']}.php";
256 256
         if (!file_exists($filename)) {
257 257
             $retval['code'] = "Created {$datatype}.";
258 258
             file_put_contents($filename, $codeData['code']);
Please login to merge, or discard this patch.
Formularium/ValidatorFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -135,7 +135,7 @@
 block discarded – undo
135 135
 
136 136
         $name = $codeData['validator'];
137 137
         $retval = [];
138
-        $filename =  $path . "/{$name}.php";
138
+        $filename = $path . "/{$name}.php";
139 139
         if (!file_exists($filename)) {
140 140
             $retval['code'] = "Created validator {$name}.";
141 141
             file_put_contents($filename, $codeData['code']);
Please login to merge, or discard this patch.
Formularium/Datatype/Datatype_countrycode.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
         ['BM', 'BMU', '060', 'Bermuda'],
74 74
         ['BN', 'BRN', '096', 'Brunei Darussalam'],
75 75
         ['BO', 'BOL', '068', 'Bolivia, Plurinational State of'],
76
-        ['BQ', 'ATB',  null, 'British Antarctic Territory'],
76
+        ['BQ', 'ATB', null, 'British Antarctic Territory'],
77 77
         ['BQ', 'BES', '535', 'Bonaire, Sint Eustatius and Saba'],
78 78
         ['BR', 'BRA', '076', 'Brazil'],
79 79
         ['BS', 'BHS', '044', 'Bahamas'],
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
         ['FK', 'FLK', '238', 'Falkland Islands (Malvinas)'],
127 127
         ['FM', 'FSM', '583', 'Micronesia, Federated States of'],
128 128
         ['FO', 'FRO', '234', 'Faroe Islands'],
129
-        ['FQ', 'ATF',  null, 'French Southern and Antarctic Territories'],
129
+        ['FQ', 'ATF', null, 'French Southern and Antarctic Territories'],
130 130
         ['FR', 'FRA', '250', 'France'],
131 131
         ['FX', 'FXX', '249', 'France, Metropolitan'],
132 132
         ['GA', 'GAB', '266', 'Gabon'],
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
         ['PU', 'PUS', '849', 'US Miscellaneous Pacific Islands'],
250 250
         ['PW', 'PLW', '585', 'Palau'],
251 251
         ['PY', 'PRY', '600', 'Paraguay'],
252
-        ['PZ', 'PCZ',  null, 'Panama Canal Zone'],
252
+        ['PZ', 'PCZ', null, 'Panama Canal Zone'],
253 253
         ['QA', 'QAT', '634', 'Qatar'],
254 254
         ['RE', 'REU', '638', 'Réunion'],
255 255
         ['RH', 'RHO', '716', 'Southern Rhodesia'],
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
         ['SH', 'SHN', '654', 'Saint Helena, Ascension and Tristan da Cunha'],
267 267
         ['SI', 'SVN', '705', 'Slovenia'],
268 268
         ['SJ', 'SJM', '744', 'Svalbard and Jan Mayen'],
269
-        ['SK', 'SKM',  null, 'Sikkim'],
269
+        ['SK', 'SKM', null, 'Sikkim'],
270 270
         ['SK', 'SVK', '703', 'Slovakia'],
271 271
         ['SL', 'SLE', '694', 'Sierra Leone'],
272 272
         ['SM', 'SMR', '674', 'San Marino'],
@@ -305,7 +305,7 @@  discard block
 block discarded – undo
305 305
         ['UZ', 'UZB', '860', 'Uzbekistan'],
306 306
         ['VA', 'VAT', '336', 'Holy See (Vatican City State)'],
307 307
         ['VC', 'VCT', '670', 'Saint Vincent and the Grenadines'],
308
-        ['VD', 'VDR',  null, 'Viet-Nam, Democratic Republic of'],
308
+        ['VD', 'VDR', null, 'Viet-Nam, Democratic Republic of'],
309 309
         ['VE', 'VEN', '862', 'Venezuela, Bolivarian Republic of'],
310 310
         ['VG', 'VGB', '092', 'Virgin Islands, British'],
311 311
         ['VI', 'VIR', '850', 'Virgin Islands, U.S.'],
Please login to merge, or discard this patch.
util/makeValidator.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
 
5 5
 $shortopts = "v:p::t::";
6 6
 $longopts = array(
7
-    "validator:",     // Required value
7
+    "validator:", // Required value
8 8
     "namespace::",
9 9
     "path::",
10 10
     "test-path::"
@@ -17,8 +17,8 @@  discard block
 block discarded – undo
17 17
 
18 18
 $validator = $options['validator'];
19 19
 $namespace = $options['namespace'] ?? 'Formularium\\Validator';
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,
Please login to merge, or discard this patch.