Passed
Push — master ( 71397f...c9d06c )
by Andreas
07:53 queued 04:19
created
src/classgenerator.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -174,7 +174,7 @@
 block discarded – undo
174 174
                     break;
175 175
             }
176 176
             if (   $default !== null
177
-                   // we need to skip working links because in this case, Doctrine expects objects as values
177
+                    // we need to skip working links because in this case, Doctrine expects objects as values
178 178
                 && (   !$property->link
179 179
                     || $this->manager->resolve_targetclass($property) === false)) {
180 180
                 $line .= ' = ' . $default;
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -62,8 +62,8 @@  discard block
 block discarded – undo
62 62
         }
63 63
 
64 64
         $types = $this->manager->get_types();
65
-        uasort($types, function ($a, $b) {
66
-            if (   !empty($a->extends)
65
+        uasort($types, function($a, $b) {
66
+            if (!empty($a->extends)
67 67
                 && !empty($b->extends)) {
68 68
                 return strnatcmp($a->extends, $b->extends);
69 69
             } elseif (!empty($a->extends)) {
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
         $prefix = $this->get_class_prefix($namespace);
105 105
 
106 106
         foreach ($this->manager->get_types() as $type) {
107
-            if (   $prefix !== ''
107
+            if ($prefix !== ''
108 108
                 && !class_exists($type->name)) {
109 109
                 $this->add_line('class_alias( "' . $prefix . $type->name . '", "' . $type->name . '");');
110 110
             }
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 
113 113
         foreach ($this->manager->get_inherited_mapping() as $child => $parent) {
114 114
             $this->add_line('class_alias( "' . $prefix . $parent . '", "' . $prefix . $child . '");');
115
-            if (   $prefix !== ''
115
+            if ($prefix !== ''
116 116
                 && !class_exists($child)) {
117 117
                 $this->add_line('class_alias( "' . $prefix . $parent . '", "' . $child . '");');
118 118
             }
@@ -173,9 +173,9 @@  discard block
 block discarded – undo
173 173
                     $objects[$name] = 'new midgard_datetime("0001-01-01 00:00:00")';
174 174
                     break;
175 175
             }
176
-            if (   $default !== null
176
+            if ($default !== null
177 177
                    // we need to skip working links because in this case, Doctrine expects objects as values
178
-                && (   !$property->link
178
+                && (!$property->link
179 179
                     || $this->manager->resolve_targetclass($property) === false)) {
180 180
                 $line .= ' = ' . $default;
181 181
             }
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
         $this->write_annotations($type);
236 236
         $this->add_line('class ' . $type->name . ' extends ' . $type->extends);
237 237
         $mixins = $type->get_mixins();
238
-        $interfaces = array_filter(array_map(function ($name) {
238
+        $interfaces = array_filter(array_map(function($name) {
239 239
             if (interface_exists('\\midgard\\portable\\storage\\interfaces\\' . $name)) {
240 240
                 return '\\midgard\\portable\\storage\\interfaces\\' . $name;
241 241
             }
Please login to merge, or discard this patch.
src/mgdschema/type.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@
 block discarded – undo
65 65
         } else {
66 66
             if ($property->parentfield) {
67 67
                 $this->parentfield = $property->name;
68
-                if (   empty($this->parent)
68
+                if (empty($this->parent)
69 69
                     && $property->link) {
70 70
                     $this->parent = $property->link['target'];
71 71
                 }
Please login to merge, or discard this patch.
src/mgdschema/manager.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@
 block discarded – undo
78 78
             $fqcn = $this->namespace . '\\' . $fqcn;
79 79
         }
80 80
 
81
-        if (   array_key_exists($fqcn, $this->types)
81
+        if (array_key_exists($fqcn, $this->types)
82 82
             || $property->link['target'] === $property->get_parent()->name) {
83 83
             $target_class = $property->link['target'];
84 84
         } else {
Please login to merge, or discard this patch.