Passed
Push — master ( 8132a2...4e233c )
by Bruno
07:18
created
Formularium/Datatype.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -133,7 +133,7 @@
 block discarded – undo
133 133
             $this->getDocumentation() .
134 134
                 "\n\nRandom value example: " . var_export($this->getRandom(), true) .
135 135
                 "\n\nSQL datatype: `" . $this->getSQLType() . "`" .
136
-                "\n\nLaravel SQL datatype: `" . $this->getLaravelSQLType('name')  . "`",
136
+                "\n\nLaravel SQL datatype: `" . $this->getLaravelSQLType('name') . "`",
137 137
             []
138 138
         );
139 139
     }
Please login to merge, or discard this patch.
Formularium/Frontend/Bootstrap/RenderableBootstrapWrapperTrait.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -64,17 +64,17 @@
 block discarded – undo
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
                         )
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
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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,
Please login to merge, or discard this patch.
Formularium/Frontend/HTMLValidation/Renderable.php 1 patch
Switch Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -28,17 +28,17 @@
 block discarded – undo
28 28
 
29 29
         foreach ($validators as $validator => $data) {
30 30
             switch ($validator) {
31
-            case MinLength::class:
32
-                $element->setAttribute('minlength', $field->getValidatorOption($validator, 'value', ''));
33
-                break;
34
-            case MaxLength::class:
35
-                $element->setAttribute('maxlength', $field->getValidatorOption($validator, 'value', ''));
36
-                break;
37
-            case Regex::class:
38
-                $element->setAttribute('pattern', $field->getValidatorOption($validator, 'value', ''));
39
-                break;
40
-            default:
41
-                break;
31
+                case MinLength::class:
32
+                    $element->setAttribute('minlength', $field->getValidatorOption($validator, 'value', ''));
33
+                    break;
34
+                case MaxLength::class:
35
+                    $element->setAttribute('maxlength', $field->getValidatorOption($validator, 'value', ''));
36
+                    break;
37
+                case Regex::class:
38
+                    $element->setAttribute('pattern', $field->getValidatorOption($validator, 'value', ''));
39
+                    break;
40
+                default:
41
+                    break;
42 42
             }
43 43
         }
44 44
 
Please login to merge, or discard this patch.
Formularium/Frontend/Vue/VueCode.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
      */
238 238
     protected function serializeProps(array $props): string
239 239
     {
240
-        $s = array_map(function ($p) {
240
+        $s = array_map(function($p) {
241 241
             return "'{$p['name']}': { 'type': {$p['type']}" . ($p['required'] ?? false ? ", 'required': true" : '') . " } ";
242 242
         }, $props);
243 243
         return "{\n        " . implode(",\n        ", $s) . "\n    }\n";
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
         $jsonData = json_encode($data);
257 257
         $props = $this->props($m);
258 258
         $propsBind = array_map(
259
-            function ($p) {
259
+            function($p) {
260 260
                 return 'v-bind:' . $p . '="model.' . $p . '"';
261 261
             },
262 262
             array_keys($props)
@@ -267,28 +267,28 @@  discard block
 block discarded – undo
267 267
             'propsBind' => implode(' ', $propsBind),
268 268
             'imports' => implode(
269 269
                 "\n",
270
-                array_map(function ($key, $value) {
270
+                array_map(function($key, $value) {
271 271
                     // TODO: array
272 272
                     return "import $key from \"$value\";";
273 273
                 }, array_keys($this->imports), $this->imports)
274 274
             ),
275 275
             'computedCode' => implode(
276 276
                 "\n",
277
-                array_map(function ($key, $value) {
277
+                array_map(function($key, $value) {
278 278
                     // TODO: array
279 279
                     return "$key() { $value },";
280 280
                 }, array_keys($this->computed), $this->computed)
281 281
             ),
282 282
             'otherData' => implode(
283 283
                 "\n",
284
-                array_map(function ($key, $value) {
284
+                array_map(function($key, $value) {
285 285
                     return "$key: " . json_encode($value) . ",\n";
286 286
                 }, array_keys($this->other), $this->other)
287 287
             ),
288 288
             'methodsCode' => '{}', // TODO
289 289
             'extraData' => implode(
290 290
                 "\n",
291
-                array_map(function ($key, $value) {
291
+                array_map(function($key, $value) {
292 292
                     return "  $key: $value,";
293 293
                 }, array_keys($this->extraData), $this->extraData)
294 294
             )
Please login to merge, or discard this patch.
Formularium/Frontend/Vuelidate/Renderable.php 2 patches
Switch Indentation   +68 added lines, -68 removed lines patch added patch discarded remove patch
@@ -34,81 +34,81 @@
 block discarded – undo
34 34
 
35 35
         foreach ($validators as $validator => $data) {
36 36
             switch ($validator) {
37
-            case Datatype::REQUIRED:
38
-            case Filled::class:
39
-                $this->setValidations(
40
-                    $field,
41
-                    'required',
42
-                    'required'
43
-                );
44
-                break;
45
-            case Equals::class:
46
-                // TODO
47
-                break;
37
+                case Datatype::REQUIRED:
38
+                case Filled::class:
39
+                    $this->setValidations(
40
+                        $field,
41
+                        'required',
42
+                        'required'
43
+                    );
44
+                    break;
45
+                case Equals::class:
46
+                    // TODO
47
+                    break;
48 48
 
49
-            case In::class:
50
-                // TODO
51
-                break;
49
+                case In::class:
50
+                    // TODO
51
+                    break;
52 52
 
53
-            case Max::class:
54
-                $this->setValidations(
55
-                    $field,
56
-                    'maxValue',
57
-                    'maxValue(' . $field->getValidatorOption($validator, 'value', '') . ')'
58
-                );
59
-                break;
60
-            case Min::class:
61
-                $this->setValidations(
62
-                    $field,
63
-                    'minValue',
64
-                    'minValue(' . $field->getValidatorOption($validator, 'value', '') . ')'
65
-                );
66
-                break;
53
+                case Max::class:
54
+                    $this->setValidations(
55
+                        $field,
56
+                        'maxValue',
57
+                        'maxValue(' . $field->getValidatorOption($validator, 'value', '') . ')'
58
+                    );
59
+                    break;
60
+                case Min::class:
61
+                    $this->setValidations(
62
+                        $field,
63
+                        'minValue',
64
+                        'minValue(' . $field->getValidatorOption($validator, 'value', '') . ')'
65
+                    );
66
+                    break;
67 67
 
68
-            case MaxLength::class:
69
-                $this->setValidations(
70
-                    $field,
71
-                    'maxLength',
72
-                    'maxLength(' . $field->getValidatorOption($validator, 'value', '') . ')'
73
-                );
74
-                break;
75
-            case MinLength::class:
76
-                $this->setValidations(
77
-                    $field,
78
-                    'minLength',
79
-                    'minLength(' . $field->getValidatorOption($validator, 'value', '') . ')'
80
-                );
81
-                break;
68
+                case MaxLength::class:
69
+                    $this->setValidations(
70
+                        $field,
71
+                        'maxLength',
72
+                        'maxLength(' . $field->getValidatorOption($validator, 'value', '') . ')'
73
+                    );
74
+                    break;
75
+                case MinLength::class:
76
+                    $this->setValidations(
77
+                        $field,
78
+                        'minLength',
79
+                        'minLength(' . $field->getValidatorOption($validator, 'value', '') . ')'
80
+                    );
81
+                    break;
82 82
 
83
-            case NotIn::class:
84
-                // TODO
85
-                break;
83
+                case NotIn::class:
84
+                    // TODO
85
+                    break;
86 86
 
87
-            case Password::class:
88
-                // TODO
89
-                break;
87
+                case Password::class:
88
+                    // TODO
89
+                    break;
90 90
 
91
-            case Regex::class:
92
-                $name = 'regex' . mt_rand();
93
-                $this->setValidations(
94
-                    $field,
95
-                    $name,
96
-                    'helpers.regex(\'' . $name . '\', /' . $field->getValidatorOption($validator, 'value', '') . '/)',
97
-                    'helpers'
98
-                );
99
-                break;
91
+                case Regex::class:
92
+                    $name = 'regex' . mt_rand();
93
+                    $this->setValidations(
94
+                        $field,
95
+                        $name,
96
+                        'helpers.regex(\'' . $name . '\', /' . $field->getValidatorOption($validator, 'value', '') . '/)',
97
+                        'helpers'
98
+                    );
99
+                    break;
100 100
                         
101
-            case SameAs::class:
102
-                $target = $field->getValidatorOption($validator, 'value', '');
103
-                $locator = $target;// TODO
104
-                $this->setValidations(
105
-                    $field,
106
-                    'sameAs',
107
-                    'sameAs(' . $locator . ')'
108
-                );
109
-                break;
110
-            default:
111
-                break;
101
+                case SameAs::class:
102
+                    $target = $field->getValidatorOption($validator, 'value', '');
103
+                    $locator = $target;// TODO
104
+                    $this->setValidations(
105
+                        $field,
106
+                        'sameAs',
107
+                        'sameAs(' . $locator . ')'
108
+                    );
109
+                    break;
110
+                default:
111
+                    break;
112 112
             }
113 113
         }
114 114
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@
 block discarded – undo
100 100
                         
101 101
             case SameAs::class:
102 102
                 $target = $field->getValidatorOption($validator, 'value', '');
103
-                $locator = $target;// TODO
103
+                $locator = $target; // TODO
104 104
                 $this->setValidations(
105 105
                     $field,
106 106
                     'sameAs',
Please login to merge, or discard this patch.