Passed
Push — master ( 3bbd58...e98e31 )
by Bruno
07:07
created
Formularium/Frontend/React/Renderable/Renderable_file.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
     public function editable($value, Field $field, HTMLElement $previous): HTMLElement
16 16
     {
17 17
         $previous->filter(
18
-            function ($e) {
18
+            function($e) {
19 19
                 if ($e->getTag() === 'canvas') {
20 20
                     return false;
21 21
                 }
Please login to merge, or discard this patch.
Formularium/Frontend/React/RenderableReactTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
      */
26 26
     public function fix($value, Field $field, HTMLElement $previous): HTMLElement
27 27
     {
28
-        $previous->walk(function (HTMLElement $element) use ($field) {
28
+        $previous->walk(function(HTMLElement $element) use ($field) {
29 29
             if ($element->getTag() === 'input') {
30 30
                 if ($element->getAttribute('type') === ['checkbox']) {
31 31
                     $element->setAttribute('checked', "{this.state.{$field->getName()}}");
Please login to merge, or discard this patch.
Formularium/ValidatorMetadata.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
     public function toGraphql(): string
31 31
     {
32 32
         $args = array_map(
33
-            function (ValidatorArgs $a) {
33
+            function(ValidatorArgs $a) {
34 34
                 return $a->toGraphql();
35 35
             },
36 36
             $this->args
Please login to merge, or discard this patch.
util/makeDatatype.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -2,9 +2,9 @@  discard block
 block discarded – undo
2 2
 
3 3
 require('vendor/autoload.php');
4 4
 
5
-$shortopts  = "d:b::n::p::t::";
6
-$longopts  = array(
7
-    "datatype:",     // Required value
5
+$shortopts = "d:b::n::p::t::";
6
+$longopts = array(
7
+    "datatype:", // Required value
8 8
     "basetype::",
9 9
     "namespace::",
10 10
     "path::",
@@ -19,8 +19,8 @@  discard block
 block discarded – undo
19 19
 $datatype = $options['datatype'];
20 20
 $basetype = $options['basetype'] ?? '';
21 21
 $namespace = $options['namespace'] ?? 'Formularium\Datatype';
22
-$path = $options['path'] ?? "Formularium/Datatype/" ;
23
-$testpath = $options['testpath'] ?? "tests/Datatype" ;
22
+$path = $options['path'] ?? "Formularium/Datatype/";
23
+$testpath = $options['testpath'] ?? "tests/Datatype";
24 24
 
25 25
 $code = \Formularium\Datatype::generate(
26 26
     $datatype,
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/Frontend/Buefy/Renderable/Renderable_file.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -61,12 +61,12 @@
 block discarded – undo
61 61
                                 [],
62 62
                                 HTMLElement::factory(
63 63
                                     'b-icon',
64
-                                    [ 'icon' => "upload", 'size' => "is-large" ]
64
+                                    ['icon' => "upload", 'size' => "is-large"]
65 65
                                 )
66 66
                             ),
67 67
                             HTMLElement::factory(
68 68
                                 'p',
69
-                                [ 'class' => 'formularium-label'],
69
+                                ['class' => 'formularium-label'],
70 70
                                 $renderable[Renderable::LABEL] ?? ''
71 71
                             )
72 72
                         ]
Please login to merge, or discard this patch.
Formularium/Frontend/Buefy/RenderableBuefyTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
         if (array_key_exists(Renderable::COMMENT, $renderable)) {
33 33
             $base->setAttribute('message', $renderable[Renderable::COMMENT]);
34 34
         }
35
-        $base->filter(function ($e) {
35
+        $base->filter(function($e) {
36 36
             if ($e instanceof HTMLElement) {
37 37
                 if ($e->getTag() === 'label') {
38 38
                     return false;
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.