Test Setup Failed
Pull Request — master (#464)
by Daniel
11:59
created
src/lib/Bootstrap/AbstractBootstrap.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
      */
43 43
     protected function setErrorHandler(): self
44 44
     {
45
-        set_error_handler(function ($severity, $message, $file, $line) {
45
+        set_error_handler(function($severity, $message, $file, $line) {
46 46
             $log = $message.' in '.$file.':'.$line;
47 47
 
48 48
             switch ($severity) {
Please login to merge, or discard this patch.
src/app/Balloon.App.DesktopClient/Api/v2/Download.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@
 block discarded – undo
64 64
             ->setHeader('Content-Type', 'application/octet-stream')
65 65
             ->setHeader('Content-Transfer-Encoding', 'binary')
66 66
             ->setOutputFormat(null)
67
-            ->setBody(function () use ($url) {
67
+            ->setBody(function() use ($url) {
68 68
                 $stream = fopen($url, 'r');
69 69
                 while (!feof($stream)) {
70 70
                     echo fread($stream, 8192);
Please login to merge, or discard this patch.
src/app/Balloon.App.Convert/Constructor/Http.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
             ->prependRoute(new Route('/api/v2/files/convert(/|\z)', Convert::class))
35 35
             ->prependRoute(new Route('/api/v2/files/{id:#([0-9a-z]{24})#}/convert(/|\z)', Convert::class));
36 36
 
37
-        $node_decorator->addDecorator('master', function ($node) use ($convert_decorator, $converter) {
37
+        $node_decorator->addDecorator('master', function($node) use ($convert_decorator, $converter) {
38 38
             $master = $node->getAppAttribute('Balloon\\App\\Convert', 'master');
39 39
             if (null === $master) {
40 40
                 return null;
Please login to merge, or discard this patch.
src/app/Balloon.App.Convert/AttributeDecorator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -101,14 +101,14 @@
 block discarded – undo
101 101
         return [
102 102
             'id' => (string) $slave['_id'],
103 103
             'format' => (string) $slave['format'],
104
-            'master' => function ($slave) use ($fs, $node_decorator) {
104
+            'master' => function($slave) use ($fs, $node_decorator) {
105 105
                 try {
106 106
                     return $node_decorator->decorate($fs->findNodeById($slave['master']), ['_links', 'id', 'name']);
107 107
                 } catch (\Exception $e) {
108 108
                     return null;
109 109
                 }
110 110
             },
111
-            'slave' => function ($slave) use ($fs, $node_decorator) {
111
+            'slave' => function($slave) use ($fs, $node_decorator) {
112 112
                 if (!isset($slave['slave'])) {
113 113
                     return null;
114 114
                 }
Please login to merge, or discard this patch.
src/app/Balloon.App.ClamAv/Constructor/Http.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
      */
25 25
     public function __construct(AttributeDecorator $decorator)
26 26
     {
27
-        $decorator->addDecorator('malware_quarantine', function ($node) {
27
+        $decorator->addDecorator('malware_quarantine', function($node) {
28 28
             if ($node instanceof File) {
29 29
                 $quarantine = $node->getAppAttribute('Balloon\\App\\ClamAv', 'quarantine');
30 30
                 if (is_bool($quarantine)) {
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
                 }
33 33
             }
34 34
         });
35
-        $decorator->addDecorator('malware_scantime', function ($node) {
35
+        $decorator->addDecorator('malware_scantime', function($node) {
36 36
             if ($node instanceof File) {
37 37
                 $ts = $node->getAppAttribute('Balloon\\App\\ClamAv', 'scantime');
38 38
 
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
                 }
42 42
             }
43 43
         });
44
-        $decorator->addDecorator('malware_reason', function ($node) {
44
+        $decorator->addDecorator('malware_reason', function($node) {
45 45
             if ($node instanceof File) {
46 46
                 return $node->getAppAttribute('Balloon\\App\\ClamAv', 'reason');
47 47
             }
Please login to merge, or discard this patch.
src/app/Balloon.App.Api/v1/AttributeDecorator/RoleDecorator.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -105,13 +105,13 @@  discard block
 block discarded – undo
105 105
         }
106 106
 
107 107
         return [
108
-            'created' => function ($role, $requested) use ($attributes) {
108
+            'created' => function($role, $requested) use ($attributes) {
109 109
                 return $attributes['created']->toDateTime()->format('c');
110 110
             },
111
-            'changed' => function ($role, $requested) use ($attributes) {
111
+            'changed' => function($role, $requested) use ($attributes) {
112 112
                 return $attributes['changed']->toDateTime()->format('c');
113 113
             },
114
-            'deleted' => function ($role, $requested) use ($attributes) {
114
+            'deleted' => function($role, $requested) use ($attributes) {
115 115
                 if (false === $attributes['deleted']) {
116 116
                     return null;
117 117
                 }
@@ -164,14 +164,14 @@  discard block
 block discarded – undo
164 164
             'name' => (string) $attributes['username'],
165 165
             'namespace' => (string) $attributes['namespace'],
166 166
             'mail' => (string) $attributes['mail'],
167
-            'avatar' => function ($role, $requested) use ($attributes) {
167
+            'avatar' => function($role, $requested) use ($attributes) {
168 168
                 if ($attributes['avatar'] instanceof Binary) {
169 169
                     return base64_encode($attributes['avatar']->getData());
170 170
                 }
171 171
 
172 172
                 return null;
173 173
             },
174
-            'soft_quota' => function ($role, $requested) use ($attributes, $user) {
174
+            'soft_quota' => function($role, $requested) use ($attributes, $user) {
175 175
                 if ($user === null) {
176 176
                     return null;
177 177
                 }
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
 
183 183
                 return null;
184 184
             },
185
-            'hard_quota' => function ($role, $requested) use ($attributes, $user) {
185
+            'hard_quota' => function($role, $requested) use ($attributes, $user) {
186 186
                 if ($user === null) {
187 187
                     return null;
188 188
                 }
Please login to merge, or discard this patch.
src/app/Balloon.App.Notification/TemplateHandler.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -101,7 +101,7 @@
 block discarded – undo
101 101
                 break;
102 102
                 default:
103 103
                     throw new InvalidArgumentException('invalid option '.$option.' given');
104
-             }
104
+                }
105 105
         }
106 106
 
107 107
         return $this;
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
      */
219 219
     protected function decorate(string $template, array $context): string
220 220
     {
221
-        return preg_replace_callback('/\{([^}\.]*)\}/', function ($match) use ($context) {
221
+        return preg_replace_callback('/\{([^}\.]*)\}/', function($match) use ($context) {
222 222
             $key = $match[1];
223 223
 
224 224
             if (isset($context[$key])) {
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
      */
233 233
     protected function decorateResource(string $template, $resource, string $prefix, $decorator): string
234 234
     {
235
-        return preg_replace_callback('/(\{'.$prefix.'\.(([a-z]\.*)+)\})/', function ($match) use ($resource, $decorator) {
235
+        return preg_replace_callback('/(\{'.$prefix.'\.(([a-z]\.*)+)\})/', function($match) use ($resource, $decorator) {
236 236
             $key = explode('.', $match[2]);
237 237
             $key = array_shift($key);
238 238
             $attrs = $decorator->decorate($resource, [$key]);
Please login to merge, or discard this patch.
src/app/Balloon.App.Notification/Adapter/Mail.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -114,10 +114,10 @@
 block discarded – undo
114 114
         $body->setParts([$html, $plain]);
115 115
 
116 116
         $mail = (new Message())
117
-          ->setSubject($message->getSubject($receiver))
118
-          ->setBody($body)
119
-          ->setTo($address)
120
-          ->setEncoding('UTF-8');
117
+            ->setSubject($message->getSubject($receiver))
118
+            ->setBody($body)
119
+            ->setTo($address)
120
+            ->setEncoding('UTF-8');
121 121
 
122 122
         $type = $mail->getHeaders()->get('Content-Type');
123 123
         $type->setType('multipart/alternative');
Please login to merge, or discard this patch.
src/app/Balloon.App.Elasticsearch/NodeAttributeDecorator.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
             'directory' => $node instanceof Collection,
57 57
             'meta' => $node->getMetaAttributes(),
58 58
             'size' => $node->getSize(),
59
-            'parent' => function ($node, $requested) use ($attributes) {
59
+            'parent' => function($node, $requested) use ($attributes) {
60 60
                 $parent = $node->getParent();
61 61
 
62 62
                 if (null === $parent || $parent->isRoot()) {
@@ -69,14 +69,14 @@  discard block
 block discarded – undo
69 69
             'shared' => (string) $attributes['shared'],
70 70
             'created' => $attributes['created']->toDateTime()->format('c'),
71 71
             'changed' => $attributes['changed']->toDateTime()->format('c'),
72
-            'deleted' => function ($node, $requested) use ($attributes) {
72
+            'deleted' => function($node, $requested) use ($attributes) {
73 73
                 if (!$attributes['deleted']) {
74 74
                     return null;
75 75
                 }
76 76
 
77 77
                 return $attributes['deleted']->toDateTime()->format('c');
78 78
             },
79
-            'destroy' => function ($node, $requested) use ($attributes) {
79
+            'destroy' => function($node, $requested) use ($attributes) {
80 80
                 if (!$attributes['destroy']) {
81 81
                     return null;
82 82
                 }
Please login to merge, or discard this patch.