Passed
Push — master ( ac5725...e2f69a )
by Bruno
08:44 queued 04:24
created
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.
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/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.
Formularium/CodeGenerator/LaravelEloquent/CodeGenerator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
         return implode(
18 18
             ";\n",
19 19
             array_map(
20
-                function ($f) {
20
+                function($f) {
21 21
                     return '$table->' . $f;
22 22
                 },
23 23
                 $this->fields($model)
Please login to merge, or discard this patch.
Formularium/Factory/DatatypeGeneratorFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@
 block discarded – undo
66 66
         $reflection = new ReflectionClass($codeGenerator);
67 67
         $classes = ClassFinder::getClassesInNamespace($reflection->getNamespaceName());
68 68
         return array_map(
69
-            function ($c) {
69
+            function($c) {
70 70
                 return new $c();
71 71
             },
72 72
             $classes
Please login to merge, or discard this patch.
Formularium/CodeGenerator/GraphQL/GraphQLDatatypeGenerator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
          * @var GraphQLCodeGenerator $generator
41 41
          */
42 42
         $renderable = array_map(
43
-            function ($name, $value) {
43
+            function($name, $value) {
44 44
                 $v = $value;
45 45
                 if (is_string($value)) {
46 46
                     $v = '"' . str_replace('"', '\\"', $value) . '"';
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
             $field->getRenderables()
52 52
         );
53 53
 
54
-        return $field->getName() . ': ' . $this->getDatatypeName($generator)  .
54
+        return $field->getName() . ': ' . $this->getDatatypeName($generator) .
55 55
             ($field->getValidatorOption(Datatype::REQUIRED, 'value', false) ? '!' : '') .
56 56
             // TODO: validators
57 57
             ($field->getRenderables() ? " @renderable(\n" . join("\n", $renderable) . "\n)" : '') .
Please login to merge, or discard this patch.