Passed
Push — master ( 2933e0...94de28 )
by Bruno
12:05 queued 08:32
created
Formularium/Frontend/VeeValidate/Renderable.php 1 patch
Switch Indentation   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -69,50 +69,50 @@
 block discarded – undo
69 69
         $rules = [];
70 70
         foreach ($validators as $validator => $data) {
71 71
             switch ($validator) {
72
-            case Datatype::REQUIRED:
73
-            case Filled::class:
74
-                $rules['required'] = true;
75
-                break;
76
-
77
-            case Equals::class:
78
-                $rules['oneOf'] = implode(',', $field->getValidatorOption($validator, 'value', ''));
79
-                break;
80
-
81
-            case In::class:
82
-                $rules['oneOf'] = implode(',', $field->getValidatorOption($validator, 'value', ''));
83
-                break;
84
-
85
-            case Max::class:
86
-                $rules['max_value'] = $field->getValidatorOption($validator, 'value', '');
87
-                break;
88
-            case Min::class:
89
-                $rules['min_value'] = $field->getValidatorOption($validator, 'value', '');
90
-                break;
91
-
92
-            case MaxLength::class:
93
-                $rules['max'] = $field->getValidatorOption($validator, 'value', '');
94
-                break;
95
-            case MinLength::class:
96
-                $rules['min'] = $field->getValidatorOption($validator, 'value', '');
97
-                break;
98
-
99
-            case NotIn::class:
100
-                // TODO
101
-                break;
102
-
103
-            case Password::class:
104
-                // TODO
105
-                break;
106
-
107
-            case Regex::class:
108
-                $rules['regex'] = $field->getValidatorOption($validator, 'value', '');
109
-                break;
110
-
111
-            case SameAs::class:
112
-                // TODO
113
-                break;
114
-            default:
115
-                break;
72
+                case Datatype::REQUIRED:
73
+                case Filled::class:
74
+                    $rules['required'] = true;
75
+                    break;
76
+
77
+                case Equals::class:
78
+                    $rules['oneOf'] = implode(',', $field->getValidatorOption($validator, 'value', ''));
79
+                    break;
80
+
81
+                case In::class:
82
+                    $rules['oneOf'] = implode(',', $field->getValidatorOption($validator, 'value', ''));
83
+                    break;
84
+
85
+                case Max::class:
86
+                    $rules['max_value'] = $field->getValidatorOption($validator, 'value', '');
87
+                    break;
88
+                case Min::class:
89
+                    $rules['min_value'] = $field->getValidatorOption($validator, 'value', '');
90
+                    break;
91
+
92
+                case MaxLength::class:
93
+                    $rules['max'] = $field->getValidatorOption($validator, 'value', '');
94
+                    break;
95
+                case MinLength::class:
96
+                    $rules['min'] = $field->getValidatorOption($validator, 'value', '');
97
+                    break;
98
+
99
+                case NotIn::class:
100
+                    // TODO
101
+                    break;
102
+
103
+                case Password::class:
104
+                    // TODO
105
+                    break;
106
+
107
+                case Regex::class:
108
+                    $rules['regex'] = $field->getValidatorOption($validator, 'value', '');
109
+                    break;
110
+
111
+                case SameAs::class:
112
+                    // TODO
113
+                    break;
114
+                default:
115
+                    break;
116 116
             }
117 117
         }
118 118
         $validationNode->addAttribute(
Please login to merge, or discard this patch.
Formularium/Factory/DatatypeFactory.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -112,11 +112,11 @@
 block discarded – undo
112 112
 @param Model \$model The entire model, if your field depends on other things of the model. may be null.
113 113
 @throws Exception If invalid, with the message.
114 114
 @return mixed The validated value.')
115
-             ->setBody("throw new ValidatorException('Not implemented');");
115
+                ->setBody("throw new ValidatorException('Not implemented');");
116 116
         
117 117
         $validateMethod->addParameter('value');
118 118
         $validateMethod->addParameter('model', null)
119
-             ->setType('\Formularium\Model');
119
+                ->setType('\Formularium\Model');
120 120
 
121 121
         if ($classCallback) {
122 122
             $classCallback($class);
Please login to merge, or discard this patch.
Formularium/StringUtil.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -14,8 +14,8 @@  discard block
 block discarded – undo
14 14
      */
15 15
     public static function startsWith($haystack, $needles)
16 16
     {
17
-        foreach ((array) $needles as $needle) {
18
-            if ((string) $needle !== '' && strncmp($haystack, $needle, strlen($needle)) === 0) {
17
+        foreach ((array)$needles as $needle) {
18
+            if ((string)$needle !== '' && strncmp($haystack, $needle, strlen($needle)) === 0) {
19 19
                 return true;
20 20
             }
21 21
         }
@@ -32,8 +32,8 @@  discard block
 block discarded – undo
32 32
      */
33 33
     public static function endsWith($haystack, $needles)
34 34
     {
35
-        foreach ((array) $needles as $needle) {
36
-            if ($needle !== '' && substr($haystack, -strlen($needle)) === (string) $needle) {
35
+        foreach ((array)$needles as $needle) {
36
+            if ($needle !== '' && substr($haystack, -strlen($needle)) === (string)$needle) {
37 37
                 return true;
38 38
             }
39 39
         }
Please login to merge, or discard this patch.
Formularium/Factory/FrameworkFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@
 block discarded – undo
90 90
     public static function factoryAll(): array
91 91
     {
92 92
         return array_map(
93
-            function ($f) {
93
+            function($f) {
94 94
                 $fName = $f . '\\Framework';
95 95
                 return new $fName();
96 96
             },
Please login to merge, or discard this patch.
util/makeRenderable.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
 
9 9
 $shortopts = "v:p::t::";
10 10
 $longopts = array(
11
-    "renderable:",     // Required value
11
+    "renderable:", // Required value
12 12
     "framework::",
13 13
     "namespace::",
14 14
     "path::",
Please login to merge, or discard this patch.
Formularium/Factory/CodeGeneratorFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@
 block discarded – undo
74 74
     public static function factoryAll(): array
75 75
     {
76 76
         return array_map(
77
-            function ($f) {
77
+            function($f) {
78 78
                 $fName = $f . '\\CodeGenerator';
79 79
                 return new $fName();
80 80
             },
Please login to merge, or discard this patch.
Formularium/CodeGenerator/SQL/DatatypeGenerator/DatatypeGenerator_bool.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,6 +30,6 @@
 block discarded – undo
30 30
 
31 31
     public function field(CodeGenerator $generator, Field $field)
32 32
     {
33
-        return $field->getName() . ' '. $this->_type($generator);
33
+        return $field->getName() . ' ' . $this->_type($generator);
34 34
     }
35 35
 }
Please login to merge, or discard this patch.
Formularium/CodeGenerator/GraphQL/CodeGenerator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
 
25 25
         $renderables = $model->getRenderables();
26 26
         $r = array_map(
27
-            function ($name, $value) {
27
+            function($name, $value) {
28 28
                 $v = $value;
29 29
                 if (is_string($value)) {
30 30
                     $v = '"' . str_replace('"', '\\"', $value) . '"';
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
@@ -341,7 +341,7 @@
 block discarded – undo
341 341
     public function serialize(): array
342 342
     {
343 343
         $fields = array_map(
344
-            function (Field $f) {
344
+            function(Field $f) {
345 345
                 return [
346 346
                     'datatype' => $f->getDatatype()->getName(),
347 347
                     'validators' => $f->getValidators(),
Please login to merge, or discard this patch.