Passed
Push — master ( a47e04...a82862 )
by Bruno
09:32
created
Modelarium/FormulariumUtils.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@
 block discarded – undo
106 106
                     throw new Exception("Directive $validator does not have argument $argName");
107 107
                 }
108 108
                 if ($argValidator->type === 'Int') {
109
-                    $argValue = (int)$argValue;
109
+                    $argValue = (int) $argValue;
110 110
                 }
111 111
                 $arguments[$argName] = $argValue;
112 112
             }
Please login to merge, or discard this patch.
Modelarium/Datatypes/Datatype_relationship.php 2 patches
Switch Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -32,18 +32,18 @@
 block discarded – undo
32 32
         if (preg_match('/^relationship:(M?[1N]{2}):([a-zA-Z0-9]+):([a-zA-Z0-9]+)$/', $name, $matches)) {
33 33
             $mode = null;
34 34
             switch ($matches[1]) {
35
-                case '11':
36
-                    $mode = self::RELATIONSHIP_ONE_TO_ONE;
37
-                    break;
38
-                case '1N':
39
-                    $mode = self::RELATIONSHIP_ONE_TO_MANY;
40
-                    break;
41
-                case 'NN':
42
-                    $mode = self::RELATIONSHIP_MANY_TO_MANY;
43
-                    break;
44
-                // TODO: morph
45
-                default:
46
-                    throw new ClassNotFoundException('Invalid relationship');
35
+            case '11':
36
+                $mode = self::RELATIONSHIP_ONE_TO_ONE;
37
+                break;
38
+            case '1N':
39
+                $mode = self::RELATIONSHIP_ONE_TO_MANY;
40
+                break;
41
+            case 'NN':
42
+                $mode = self::RELATIONSHIP_MANY_TO_MANY;
43
+                break;
44
+            // TODO: morph
45
+            default:
46
+                throw new ClassNotFoundException('Invalid relationship');
47 47
             }
48 48
             return static::factory($matches[2], $matches[3], $matches[1]); // $mode);
49 49
         }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,10 +17,10 @@
 block discarded – undo
17 17
     public const RELATIONSHIP = "RELATIONSHIP";
18 18
     public const RELATIONSHIP_ONE_TO_ONE = "RELATIONSHIP_ONE_TO_ONE";
19 19
     public const RELATIONSHIP_ONE_TO_MANY = "RELATIONSHIP_ONE_TO_MANY";
20
-    public const RELATIONSHIP_MANY_TO_MANY  = "RELATIONSHIP_MANY_TO_MANY";
20
+    public const RELATIONSHIP_MANY_TO_MANY = "RELATIONSHIP_MANY_TO_MANY";
21 21
     public const MORPH_ONE_TO_ONE = "RELATIONSHIP_ONE_TO_ONE";
22 22
     public const MORPH_ONE_TO_MANY = "RELATIONSHIP_ONE_TO_MANY";
23
-    public const MORPH_MANY_TO_MANY  = "RELATIONSHIP_MANY_TO_MANY";
23
+    public const MORPH_MANY_TO_MANY = "RELATIONSHIP_MANY_TO_MANY";
24 24
 
25 25
     /**
26 26
      * @param string $name relationship:[mode]:[source]:[target]
Please login to merge, or discard this patch.
Modelarium/Laravel/Targets/ModelGenerator.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
                      * @var ObjectType $object
272 272
                      */
273 273
 
274
-                    if (str_starts_with((string)$name, '__')) {
274
+                    if (str_starts_with((string) $name, '__')) {
275 275
                         // internal type
276 276
                         continue;
277 277
                     }
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
                             continue;
284 284
                         }
285 285
 
286
-                        $methodName = $this->getInflector()->pluralize(mb_strtolower((string)$name));
286
+                        $methodName = $this->getInflector()->pluralize(mb_strtolower((string) $name));
287 287
                         $this->class->addMethod($methodName)
288 288
                                 ->setPublic()
289 289
                                 ->setBody("return \$this->morphedByMany($name::class, '$lowerName');");
@@ -301,7 +301,7 @@  discard block
 block discarded – undo
301 301
         if ($generateRandom) {
302 302
             $this->methodRandom->addBody(
303 303
                 '$data["' . $lowerName . '_id"] = function () {' . "\n" .
304
-                '    return factory(' . $targetClass . '::class)->create()->id;'  . "\n" .
304
+                '    return factory(' . $targetClass . '::class)->create()->id;' . "\n" .
305 305
                 '};'
306 306
             );
307 307
         }
Please login to merge, or discard this patch.