Passed
Push — master ( 50a8ee...c60c84 )
by Bruno
07:29
created
Modelarium/Datatypes/RelationshipFactory.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -16,10 +16,10 @@  discard block
 block discarded – undo
16 16
     public const RELATIONSHIP = "RELATIONSHIP";
17 17
     public const RELATIONSHIP_ONE_TO_ONE = "11";
18 18
     public const RELATIONSHIP_ONE_TO_MANY = "1N";
19
-    public const RELATIONSHIP_MANY_TO_MANY  = "NN";
19
+    public const RELATIONSHIP_MANY_TO_MANY = "NN";
20 20
     public const MORPH_ONE_TO_ONE = "M11";
21 21
     public const MORPH_ONE_TO_MANY = "M1N";
22
-    public const MORPH_MANY_TO_MANY  = "MNN";
22
+    public const MORPH_MANY_TO_MANY = "MNN";
23 23
 
24 24
     private function __construct()
25 25
     {
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
             if (!in_array($matches['mode'], $relationships)) {
52 52
                 throw new ClassNotFoundException('Invalid relationship');
53 53
             }
54
-            return static::factory($matches['source'], $matches['target'], $matches['mode'], (bool)$matches['inverse']);
54
+            return static::factory($matches['source'], $matches['target'], $matches['mode'], (bool) $matches['inverse']);
55 55
         }
56 56
         throw new ClassNotFoundException('Invalid relationship');
57 57
     }
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
@@ -304,7 +304,7 @@  discard block
 block discarded – undo
304 304
                      * @var ObjectType $object
305 305
                      */
306 306
 
307
-                    if (str_starts_with((string)$name, '__')) {
307
+                    if (str_starts_with((string) $name, '__')) {
308 308
                         // internal type
309 309
                         continue;
310 310
                     }
@@ -316,7 +316,7 @@  discard block
 block discarded – undo
316 316
                             continue;
317 317
                         }
318 318
 
319
-                        $methodName = $this->getInflector()->pluralize(mb_strtolower((string)$name));
319
+                        $methodName = $this->getInflector()->pluralize(mb_strtolower((string) $name));
320 320
                         $this->class->addMethod($methodName)
321 321
                                 ->setReturnType('\\Illuminate\\Database\\Eloquent\\Relations\\MorphToMany')
322 322
                                 ->setPublic()
@@ -341,7 +341,7 @@  discard block
 block discarded – undo
341 341
         if ($generateRandom) {
342 342
             $this->methodRandom->addBody(
343 343
                 '$data["' . $lowerName . '_id"] = function () {' . "\n" .
344
-                '    return factory(' . $targetClass . '::class)->create()->id;'  . "\n" .
344
+                '    return factory(' . $targetClass . '::class)->create()->id;' . "\n" .
345 345
                 '};'
346 346
             );
347 347
         }
Please login to merge, or discard this patch.