Passed
Push — master ( c58a40...6d37ad )
by Mathias
10:02 queued 04:27
created
module/Core/src/Controller/Plugin/FileSender.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
 
58 58
         $metadata = $file->getMetadata();
59 59
         $response->getHeaders()->addHeaderline('Content-Type', $metadata->getContentType())
60
-                               ->addHeaderline('Content-Length', $file->getLength());
60
+                                ->addHeaderline('Content-Length', $file->getLength());
61 61
         $response->sendHeaders();
62 62
         
63 63
         $resource = $fileManager->getStream($file);
Please login to merge, or discard this patch.
module/Core/src/Paginator/Adapter/DoctrineMongoLateAdapter.php 2 patches
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
             $qb = $this->queryBuilder;
49 49
             $qb->skip($offset)->limit($itemCountPerPage);
50 50
             return $qb->getQuery()->toArray();
51
-        }catch (\Exception $e){
51
+        } catch (\Exception $e){
52 52
             throw $e;
53 53
         }
54 54
     }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
         $this->queryBuilder = $queryBuilder;
38 38
 
39 39
         // skip count during tests
40
-        if(!is_null($filtered)){
40
+        if (!is_null($filtered)) {
41 41
             $this->queryBuilder = $filtered;
42 42
             $this->totalItem = (clone $filtered)->count()->getQuery()->execute();
43 43
         }
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
             $qb = $this->queryBuilder;
51 51
             $qb->skip($offset)->limit($itemCountPerPage);
52 52
             return $qb->getQuery()->toArray();
53
-        }catch (\Exception $e){
53
+        } catch (\Exception $e) {
54 54
             throw $e;
55 55
         }
56 56
     }
Please login to merge, or discard this patch.
module/Core/src/Factory/Controller/FileControllerFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,6 +27,6 @@
 block discarded – undo
27 27
         $coreFileEvents = $container->get('Core/File/Events');
28 28
         $fileManager = $container->get(FileManager::class);
29 29
 
30
-        return new FileController($fileManager,$coreFileEvents);
30
+        return new FileController($fileManager, $coreFileEvents);
31 31
     }
32 32
 }
Please login to merge, or discard this patch.
module/Core/src/Mail/MailServiceFactory.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -49,12 +49,12 @@  discard block
 block discarded – undo
49 49
         $configArray = array_merge($configArray, $mails);
50 50
 
51 51
         $config = new MailServiceConfig($configArray);
52
-        $service   = new MailService($container, $config->toArray());
52
+        $service = new MailService($container, $config->toArray());
53 53
         $config->configureServiceManager($service);
54 54
         foreach ($config->toArray() as $name=>$value) {
55 55
             $method = 'set'.$name;
56 56
             if (method_exists($service, $method)) {
57
-                call_user_func([$service,$method], $value);
57
+                call_user_func([$service, $method], $value);
58 58
             }
59 59
         }
60 60
 
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
         } elseif (MailService::TRANSPORT_FILE == $type) {
72 72
             $fileOptions = new FileOptions();
73 73
             $path = $mailServiceOptions->getPath();
74
-            if(!is_dir($path)){
74
+            if (!is_dir($path)) {
75 75
                 mkdir($path, true);
76 76
             }
77 77
 
Please login to merge, or discard this patch.
module/Core/src/Entity/ImageSetInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,5 +21,5 @@
 block discarded – undo
21 21
 
22 22
     public function add(ImageInterface $image): self;
23 23
 
24
-    public function get(string $key, bool $fallback=true): ?ImageInterface;
24
+    public function get(string $key, bool $fallback = true): ?ImageInterface;
25 25
 }
26 26
\ No newline at end of file
Please login to merge, or discard this patch.
module/Core/src/Entity/Hydrator/Strategy/FileUploadStrategy.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
         User $user,
39 39
         string $metadataClass,
40 40
         string $entityClass
41
-    ){
41
+    ) {
42 42
 
43 43
         $this->user = $user;
44 44
         $this->metadataClass = $metadataClass;
Please login to merge, or discard this patch.
module/Core/src/Entity/Hydrator/ImageSetHydrator.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -71,9 +71,9 @@  discard block
 block discarded – undo
71 71
         }
72 72
 
73 73
         $data = $data['original'];
74
-        $file  = $data['tmp_name'];
74
+        $file = $data['tmp_name'];
75 75
 
76
-        if(!is_readable($file)){
76
+        if (!is_readable($file)) {
77 77
             throw new \Exception("File '$file' is unreadable.");
78 78
         }
79 79
 
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
         }
97 97
 
98 98
         /* @var ImageInterface $image */
99
-        foreach($images as $key => $image) {
99
+        foreach ($images as $key => $image) {
100 100
             $object->add($image);
101 101
         }
102 102
 
@@ -138,8 +138,8 @@  discard block
 block discarded – undo
138 138
         /* @var \Core\Entity\ImageMetadata $metadata */
139 139
         $metadata = $this->options->getMetadata();
140 140
         $fileManager = $this->fileManager;
141
-        $name = ($prefix ? "$prefix-" : '') . $data['name'];
142
-        $key = "" == $prefix ? "original":$prefix;
141
+        $name = ($prefix ? "$prefix-" : '').$data['name'];
142
+        $key = "" == $prefix ? "original" : $prefix;
143 143
         $metadata->setContentType($data['type']);
144 144
         $metadata->setBelongsTo($imageSetId);
145 145
         $metadata->setKey($key);
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 
148 148
         if (is_string($image)) {
149 149
             $file = $image;
150
-        }else{
150
+        } else {
151 151
             $format = str_replace('image/', '', $data['type']);
152 152
             $content = $image->get($format);
153 153
             $file = '/tmp/php'.md5($content);
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -147,7 +147,7 @@
 block discarded – undo
147 147
 
148 148
         if (is_string($image)) {
149 149
             $file = $image;
150
-        }else{
150
+        } else{
151 151
             $format = str_replace('image/', '', $data['type']);
152 152
             $content = $image->get($format);
153 153
             $file = '/tmp/php'.md5($content);
Please login to merge, or discard this patch.
module/Core/src/Entity/Hydrator/AnonymEntityHydrator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,12 +45,12 @@
 block discarded – undo
45 45
         }
46 46
         */
47 47
         $setterMethods = array();
48
-        if(method_exists($object, 'getSetters')){
48
+        if (method_exists($object, 'getSetters')) {
49 49
             $setterMethods = $object->getSetters();
50 50
         }
51 51
 
52 52
         foreach ($data as $key => $value) {
53
-            $setter = 'set' . ucfirst($key);
53
+            $setter = 'set'.ucfirst($key);
54 54
             if (in_array($setter, $setterMethods)) {
55 55
                 $object->$setter($value);
56 56
             } else {
Please login to merge, or discard this patch.
module/Core/src/Entity/Image.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,6 +28,6 @@
 block discarded – undo
28 28
 
29 29
     public function getUri(): string
30 30
     {
31
-        return '/'.trim('file/Core.Images/' . $this->id . "/" . urlencode($this->name), '/');
31
+        return '/'.trim('file/Core.Images/'.$this->id."/".urlencode($this->name), '/');
32 32
     }
33 33
 }
34 34
\ No newline at end of file
Please login to merge, or discard this patch.