Passed
Push — master ( f6d124...7e656e )
by Andreas
03:36
created
src/classgenerator.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -52,8 +52,8 @@  discard block
 block discarded – undo
52 52
         }
53 53
 
54 54
         $types = $this->manager->get_types();
55
-        uasort($types, function (type $a, type $b) {
56
-            if (   !empty($a->extends)
55
+        uasort($types, function(type $a, type $b) {
56
+            if (!empty($a->extends)
57 57
                 && !empty($b->extends)) {
58 58
                 return strnatcmp($a->extends, $b->extends);
59 59
             }
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
         $prefix = $this->get_class_prefix($namespace);
97 97
 
98 98
         foreach ($this->manager->get_types() as $type) {
99
-            if (   $prefix !== ''
99
+            if ($prefix !== ''
100 100
                 && !class_exists($type->name)) {
101 101
                 $this->add_line('class_alias( "' . $prefix . $type->name . '", "' . $type->name . '");');
102 102
             }
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 
105 105
         foreach ($this->manager->get_inherited_mapping() as $child => $parent) {
106 106
             $this->add_line('class_alias( "' . $prefix . $parent . '", "' . $prefix . $child . '");');
107
-            if (   $prefix !== ''
107
+            if ($prefix !== ''
108 108
                 && !class_exists($child)) {
109 109
                 $this->add_line('class_alias( "' . $prefix . $parent . '", "' . $child . '");');
110 110
             }
@@ -165,9 +165,9 @@  discard block
 block discarded – undo
165 165
                     $objects[$name] = 'new midgard_datetime("0001-01-01 00:00:00")';
166 166
                     break;
167 167
             }
168
-            if (   $default !== null
168
+            if ($default !== null
169 169
                    // we need to skip working links because in this case, Doctrine expects objects as values
170
-                && (   !$property->link
170
+                && (!$property->link
171 171
                     || $this->manager->resolve_targetclass($property) === false)) {
172 172
                 $line .= ' = ' . $default;
173 173
             }
@@ -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 (string $name) {
238
+        $interfaces = array_filter(array_map(function(string $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.