Passed
Push — master ( 840640...50a8ee )
by Bruno
10:07
created
Modelarium/Datatypes/Datatype_relationship.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
     /**
32 32
      * @var string
33 33
      */
34
-    protected $targetClass= '';
34
+    protected $targetClass = '';
35 35
 
36 36
     /**
37 37
      * If false, $source is "User" (class with HasOne/HasMany posts())
Please login to merge, or discard this patch.
Modelarium/Datatypes/RelationshipFactory.php 2 patches
Switch Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -41,19 +41,19 @@
 block discarded – undo
41 41
         )) {
42 42
             $mode = null;
43 43
             switch ($matches['mode']) {
44
-                case '11':
45
-                    $mode = self::RELATIONSHIP_ONE_TO_ONE;
46
-                    break;
47
-                case '1N':
48
-                    $mode = self::RELATIONSHIP_ONE_TO_MANY;
49
-                    break;
50
-                case 'NN':
51
-                case 'N1': // TODO
52
-                    $mode = self::RELATIONSHIP_MANY_TO_MANY;
53
-                    break;
54
-                // TODO: morph
55
-                default:
56
-                    throw new ClassNotFoundException('Invalid relationship');
44
+            case '11':
45
+                $mode = self::RELATIONSHIP_ONE_TO_ONE;
46
+                break;
47
+            case '1N':
48
+                $mode = self::RELATIONSHIP_ONE_TO_MANY;
49
+                break;
50
+            case 'NN':
51
+            case 'N1': // TODO
52
+                $mode = self::RELATIONSHIP_MANY_TO_MANY;
53
+                break;
54
+            // TODO: morph
55
+            default:
56
+                throw new ClassNotFoundException('Invalid relationship');
57 57
             }
58 58
             return static::factory($matches['source'], $matches['target'], $mode, (bool)$matches['inverse']);
59 59
         }
Please login to merge, or discard this 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 = "RELATIONSHIP_ONE_TO_ONE";
18 18
     public const RELATIONSHIP_ONE_TO_MANY = "RELATIONSHIP_ONE_TO_MANY";
19
-    public const RELATIONSHIP_MANY_TO_MANY  = "RELATIONSHIP_MANY_TO_MANY";
19
+    public const RELATIONSHIP_MANY_TO_MANY = "RELATIONSHIP_MANY_TO_MANY";
20 20
     public const MORPH_ONE_TO_ONE = "RELATIONSHIP_ONE_TO_ONE";
21 21
     public const MORPH_ONE_TO_MANY = "RELATIONSHIP_ONE_TO_MANY";
22
-    public const MORPH_MANY_TO_MANY  = "RELATIONSHIP_MANY_TO_MANY";
22
+    public const MORPH_MANY_TO_MANY = "RELATIONSHIP_MANY_TO_MANY";
23 23
     private function __construct()
24 24
     {
25 25
         // nothing
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
                 default:
56 56
                     throw new ClassNotFoundException('Invalid relationship');
57 57
             }
58
-            return static::factory($matches['source'], $matches['target'], $mode, (bool)$matches['inverse']);
58
+            return static::factory($matches['source'], $matches['target'], $mode, (bool) $matches['inverse']);
59 59
         }
60 60
         throw new ClassNotFoundException('Invalid relationship');
61 61
     }
Please login to merge, or discard this patch.