Passed
Push — master ( 0fbfd0...0a4722 )
by Carsten
11:27
created
module/Core/src/Entity/AttachableEntityTrait.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
     /**
79 79
      * @see AttachableEntityInterface::createAttachedEntity()
80 80
      */
81
-    public function createAttachedEntity($entityClass, $values = [], $key=null)
81
+    public function createAttachedEntity($entityClass, $values = [], $key = null)
82 82
     {
83 83
         return $this->getAttachableEntityManager()->createAttachedEntity($entityClass, $values, $key);
84 84
     }
Please login to merge, or discard this patch.
module/Core/src/Entity/AbstractLocation.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -96,23 +96,23 @@  discard block
 block discarded – undo
96 96
             }
97 97
         }
98 98
         if ($number) {
99
-            $str .= ' ' . $number . ', ';
99
+            $str .= ' '.$number.', ';
100 100
         }
101 101
         if ($postalCode) {
102
-            $str .= $postalCode . ' ';
102
+            $str .= $postalCode.' ';
103 103
         }
104 104
         if ($city) {
105 105
             $str .= $city;
106 106
         }
107 107
         if ($region) {
108
-            $str .= ', ' . $region;
108
+            $str .= ', '.$region;
109 109
         }
110 110
         if ($country) {
111
-            $str .= ', ' . $country;
111
+            $str .= ', '.$country;
112 112
         }
113 113
         if ($coords) {
114 114
             $coords = $coords->getCoordinates();
115
-            $str .= ' ( ' . join(', ', $coords) . ' )';
115
+            $str .= ' ( '.join(', ', $coords).' )';
116 116
         }
117 117
         
118 118
         return $str;
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
             }
155 155
 
156 156
             if ('coordinates' == $key) {
157
-                $class = '\\Geo\\Entity\\Geometry\\' . $value['type'];
157
+                $class = '\\Geo\\Entity\\Geometry\\'.$value['type'];
158 158
                 $value = new $class($value['coordinates']);
159 159
             }
160 160
 
Please login to merge, or discard this patch.
module/Core/src/Entity/Permissions.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -149,21 +149,21 @@  discard block
 block discarded – undo
149 149
         }
150 150
 
151 151
         if (preg_match('~^is(View|Change|None|All)Granted$~', $method, $match)) {
152
-            $permission = constant('self::PERMISSION_' . strtoupper($match[1]));
152
+            $permission = constant('self::PERMISSION_'.strtoupper($match[1]));
153 153
             return $this->isGranted($params[0], $permission);
154 154
         }
155 155
         
156 156
         if (preg_match('~^grant(View|Change|None|All)$~', $method, $match)) {
157
-            $permission = constant('self::PERMISSION_' . strtoupper($match[1]));
157
+            $permission = constant('self::PERMISSION_'.strtoupper($match[1]));
158 158
             return $this->grant($params[0], $permission);
159 159
         }
160 160
         
161 161
         if (preg_match('~^revoke(View|Change|None|All)$~', $method, $match)) {
162
-            $permission = constant('self::PERMISSION_' . strtoupper($match[1]));
162
+            $permission = constant('self::PERMISSION_'.strtoupper($match[1]));
163 163
             return $this->revoke($params[0], $permission);
164 164
         }
165 165
         
166
-        throw new \BadMethodCallException('Unknown method "' . $method . '"');
166
+        throw new \BadMethodCallException('Unknown method "'.$method.'"');
167 167
     }
168 168
 
169 169
     /**
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
         if ($build) {
312 312
             $this->build();
313 313
         }
314
-        $this->hasChanged= true;
314
+        $this->hasChanged = true;
315 315
 
316 316
         // restore orginial permissions type
317 317
         $this->type = $oldType;
@@ -444,10 +444,10 @@  discard block
 block discarded – undo
444 444
         }
445 445
         
446 446
         if ($resource instanceof UserInterface) {
447
-            return 'user:' . $resource->getId();
447
+            return 'user:'.$resource->getId();
448 448
         }
449 449
         
450
-        return 'user:' . $resource;
450
+        return 'user:'.$resource;
451 451
     }
452 452
 
453 453
     /**
@@ -467,7 +467,7 @@  discard block
 block discarded – undo
467 467
         );
468 468
         if (!in_array($permission, $perms)) {
469 469
             throw new \InvalidArgumentException(
470
-                'Invalid permission. Must be one of ' . implode(', ', $perms)
470
+                'Invalid permission. Must be one of '.implode(', ', $perms)
471 471
             );
472 472
         }
473 473
     }
Please login to merge, or discard this patch.
module/Core/src/Entity/FileEntity.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -146,18 +146,18 @@
 block discarded – undo
146 146
         $size = $this->getLength();
147 147
         
148 148
         if ($size >= 1073741824) {
149
-            return round($size / 1073741824, 2) . ' GB';
149
+            return round($size / 1073741824, 2).' GB';
150 150
         }
151 151
         
152 152
         if ($size >= 1048576) {
153
-            return round($size / 1048576, 2) . ' MB';
153
+            return round($size / 1048576, 2).' MB';
154 154
         }
155 155
         
156 156
         if ($size >= 1024) {
157
-            return round($size / 1024, 2) . ' kB';
157
+            return round($size / 1024, 2).' kB';
158 158
         }
159 159
         
160
-        return (string)$size;
160
+        return (string) $size;
161 161
     }
162 162
 
163 163
     /**
Please login to merge, or discard this patch.
module/Core/src/Entity/Status/AbstractStatus.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
         $states = static::getStates();
59 59
 
60 60
         if (!in_array($state, $states)) {
61
-            throw new \InvalidArgumentException('Invalid state name: ' . $state);
61
+            throw new \InvalidArgumentException('Invalid state name: '.$state);
62 62
         }
63 63
 
64 64
         $this->state = $state;
Please login to merge, or discard this patch.
module/Core/src/Entity/Hydrator/EntityHydrator.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -32,9 +32,9 @@  discard block
 block discarded – undo
32 32
         
33 33
         $getters = array_filter(
34 34
             get_class_methods($object),
35
-            function ($methodName) use ($object) {
35
+            function($methodName) use ($object) {
36 36
                 return "get" === substr($methodName, 0, 3)
37
-                && method_exists($object, 's' . substr($methodName, 1));
37
+                && method_exists($object, 's'.substr($methodName, 1));
38 38
             }
39 39
         );
40 40
 
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
         }
62 62
         $setters = array_filter(
63 63
             get_class_methods($object),
64
-            function ($methodName) {
64
+            function($methodName) {
65 65
                 return "set" === substr($methodName, 0, 3);
66 66
             }
67 67
         );
Please login to merge, or discard this patch.
module/Core/src/Entity/Hydrator/AnonymEntityHydrator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
             $setterMethods = $object->getSetters();
44 44
         }
45 45
         foreach ($data as $key => $value) {
46
-            $setter = 'set' . ucfirst($key);
46
+            $setter = 'set'.ucfirst($key);
47 47
             if (in_array($setter, $setterMethods)) {
48 48
                 $object->$setter($value);
49 49
             } else {
Please login to merge, or discard this patch.
module/Core/src/Entity/Hydrator/Strategy/FileCopyStrategy.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
         
79 79
         // ensures garbage removal
80 80
         register_shutdown_function(
81
-            function ($filename) {
81
+            function($filename) {
82 82
                 @unlink($filename);
83 83
             },
84 84
             $tmp
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
         foreach (['user', 'name', 'type'] as $key) {
96 96
             $v = $value->{"get$key"}();
97 97
             if ($v) {
98
-                $return[$key]=$v;
98
+                $return[$key] = $v;
99 99
             }
100 100
         }
101 101
 
Please login to merge, or discard this patch.
module/Core/src/Entity/Hydrator/ImageSetHydrator.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
         $imageSpecs = $this->options->getImages();
87 87
 
88 88
 
89
-        $images = [ ImageSetInterface::ORIGINAL => $this->createEntity($file, $data) ];
89
+        $images = [ImageSetInterface::ORIGINAL => $this->createEntity($file, $data)];
90 90
 
91 91
         foreach ($imageSpecs as $key => $size) {
92 92
             $newImage = ImageSetInterface::THUMBNAIL == $key
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
                 : $this->createImage($image, $size);
95 95
 
96 96
             if ($newImage) {
97
-                $entity   = $this->createEntity($newImage, $data, $key);
97
+                $entity = $this->createEntity($newImage, $data, $key);
98 98
                 $images[$key] = $entity;
99 99
             }
100 100
         }
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 
143 143
         $entity
144 144
             ->setFile($file)
145
-            ->setName(($prefix ? "$prefix-" : '') . $data['name'])
145
+            ->setName(($prefix ? "$prefix-" : '').$data['name'])
146 146
             ->setType($data['type'])
147 147
         ;
148 148
 
Please login to merge, or discard this patch.