Completed
Branch dev (d5d70c)
by Raffael
11:00
created
src/app/Balloon.App.Api/v1/Node.php 3 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
      * @param array|string $id
283 283
      * @param array|string $p
284 284
      * @param int          $offset
285
-     * @param int          $legnth
285
+     * @param int          $length
286 286
      * @param string       $encode
287 287
      * @param bool         $download
288 288
      * @param string       $name
@@ -1420,7 +1420,7 @@  discard block
 block discarded – undo
1420 1420
      * @param string $class      Force set node type
1421 1421
      * @param bool   $multiple   Allow $id to be an array
1422 1422
      * @param bool   $allow_root Allow instance of root collection
1423
-     * @param bool   $deleted    How to handle deleted node
1423
+     * @param integer   $deleted    How to handle deleted node
1424 1424
      *
1425 1425
      * @return NodeInterface
1426 1426
      */
@@ -1454,7 +1454,7 @@  discard block
 block discarded – undo
1454 1454
      * @param string $id
1455 1455
      * @param string $path
1456 1456
      * @param string $class   Force set node type
1457
-     * @param bool   $deleted How to handle deleted node
1457
+     * @param integer   $deleted How to handle deleted node
1458 1458
      *
1459 1459
      * @return Generator
1460 1460
      */
Please login to merge, or discard this patch.
Indentation   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -320,50 +320,50 @@  discard block
 block discarded – undo
320 320
         }
321 321
 
322 322
         return (new Response())
323
-          ->setOutputFormat(null)
324
-          ->setBody(function () use ($node, $encode, $offset, $length) {
325
-              $mime = $node->getContentType();
326
-              $stream = $node->get();
327
-              $name = $node->getName();
328
-
329
-              if (null === $stream) {
330
-                  return;
331
-              }
332
-
333
-              if (0 !== $offset) {
334
-                  if (fseek($stream, $offset) === -1) {
335
-                      throw new Exception\Conflict(
323
+            ->setOutputFormat(null)
324
+            ->setBody(function () use ($node, $encode, $offset, $length) {
325
+                $mime = $node->getContentType();
326
+                $stream = $node->get();
327
+                $name = $node->getName();
328
+
329
+                if (null === $stream) {
330
+                    return;
331
+                }
332
+
333
+                if (0 !== $offset) {
334
+                    if (fseek($stream, $offset) === -1) {
335
+                        throw new Exception\Conflict(
336 336
                         'invalid offset requested',
337 337
                         Exception\Conflict::INVALID_OFFSET
338 338
                     );
339
-                  }
340
-              }
341
-
342
-              $read = 0;
343
-              header('Content-Type: '.$mime.'');
344
-              if ('base64' === $encode) {
345
-                  header('Content-Encoding: base64');
346
-                  while (!feof($stream)) {
347
-                      if (0 !== $length && $read + 8192 > $length) {
348
-                          echo base64_encode(fread($stream, $length - $read));
349
-                          exit();
350
-                      }
351
-
352
-                      echo base64_encode(fread($stream, 8192));
353
-                      $read += 8192;
354
-                  }
355
-              } else {
356
-                  while (!feof($stream)) {
357
-                      if (0 !== $length && $read + 8192 > $length) {
358
-                          echo fread($stream, $length - $read);
359
-                          exit();
360
-                      }
361
-
362
-                      echo fread($stream, 8192);
363
-                      $read += 8192;
364
-                  }
365
-              }
366
-          });
339
+                    }
340
+                }
341
+
342
+                $read = 0;
343
+                header('Content-Type: '.$mime.'');
344
+                if ('base64' === $encode) {
345
+                    header('Content-Encoding: base64');
346
+                    while (!feof($stream)) {
347
+                        if (0 !== $length && $read + 8192 > $length) {
348
+                            echo base64_encode(fread($stream, $length - $read));
349
+                            exit();
350
+                        }
351
+
352
+                        echo base64_encode(fread($stream, 8192));
353
+                        $read += 8192;
354
+                    }
355
+                } else {
356
+                    while (!feof($stream)) {
357
+                        if (0 !== $length && $read + 8192 > $length) {
358
+                            echo fread($stream, $length - $read);
359
+                            exit();
360
+                        }
361
+
362
+                        echo fread($stream, 8192);
363
+                        $read += 8192;
364
+                    }
365
+                }
366
+            });
367 367
     }
368 368
 
369 369
     /**
@@ -1502,9 +1502,9 @@  discard block
 block discarded – undo
1502 1502
                 $node->zip($archive);
1503 1503
             } catch (\Exception $e) {
1504 1504
                 $this->logger->debug('failed zip node in multi node request ['.$node->getId().']', [
1505
-                   'category' => get_class($this),
1506
-                   'exception' => $e,
1507
-               ]);
1505
+                    'category' => get_class($this),
1506
+                    'exception' => $e,
1507
+                ]);
1508 1508
             }
1509 1509
         }
1510 1510
 
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 /**
6 6
  * balloon
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
             $result = $this->_getNode($id, $p, null, false, false, $deleted);
124 124
 
125 125
             $response = (new Response())
126
-                ->setHeader('Content-Length', (string) $result->getSize())
126
+                ->setHeader('Content-Length', (string)$result->getSize())
127 127
                 ->setHeader('Content-Type', $result->getContentType())
128 128
                 ->setCode(200);
129 129
 
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
             }
193 193
         }
194 194
 
195
-        return $this->bulk($id, $p, function ($node) use ($parent, $conflict, $move) {
195
+        return $this->bulk($id, $p, function($node) use ($parent, $conflict, $move) {
196 196
             if (true === $move) {
197 197
                 $node = $node->setParent($parent, $conflict);
198 198
             }
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
 
274 274
         $node = $this->_getNode($id, $p);
275 275
         if ($node instanceof Collection) {
276
-            return (new Response())->setBody(function () use ($node) {
276
+            return (new Response())->setBody(function() use ($node) {
277 277
                 $node->getZip();
278 278
             });
279 279
         }
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
             $response->setHeader('Content-Disposition', 'attachment; filename*=UTF-8\'\''.rawurlencode($name));
285 285
             $response->setHeader('Cache-Control', 'no-store, no-cache, must-revalidate, post-check=0, pre-check=0');
286 286
             $response->setHeader('Content-Type', 'application/octet-stream');
287
-            $response->setHeader('Content-Length', (string) $node->getSize());
287
+            $response->setHeader('Content-Length', (string)$node->getSize());
288 288
             $response->setHeader('Content-Transfer-Encoding', 'binary');
289 289
         } else {
290 290
             $response->setHeader('Content-Disposition', 'inline; filename*=UTF-8\'\''.rawurlencode($name));
@@ -292,7 +292,7 @@  discard block
 block discarded – undo
292 292
 
293 293
         return (new Response())
294 294
           ->setOutputFormat(null)
295
-          ->setBody(function () use ($node, $encode, $offset, $length) {
295
+          ->setBody(function() use ($node, $encode, $offset, $length) {
296 296
               $mime = $node->getContentType();
297 297
               $stream = $node->get();
298 298
               $name = $node->getName();
@@ -365,7 +365,7 @@  discard block
 block discarded – undo
365 365
      */
366 366
     public function postReadonly($id = null, $p = null, bool $readonly = true): Response
367 367
     {
368
-        return $this->bulk($id, $p, function ($node) use ($readonly) {
368
+        return $this->bulk($id, $p, function($node) use ($readonly) {
369 369
             $node->setReadonly($readonly);
370 370
 
371 371
             return ['code' => 204];
@@ -618,7 +618,7 @@  discard block
 block discarded – undo
618 618
      */
619 619
     public function postMetaAttributes(array $attributes, ?string $id = null, ?string $p = null): Response
620 620
     {
621
-        return $this->bulk($id, $p, function ($node) use ($attributes) {
621
+        return $this->bulk($id, $p, function($node) use ($attributes) {
622 622
             $node->setMetaAttributes($attributes);
623 623
 
624 624
             return ['code' => 204];
@@ -706,7 +706,7 @@  discard block
 block discarded – undo
706 706
             );
707 707
         }
708 708
 
709
-        return $this->bulk($id, $p, function ($node) use ($parent, $conflict) {
709
+        return $this->bulk($id, $p, function($node) use ($parent, $conflict) {
710 710
             $result = $node->copyTo($parent, $conflict);
711 711
 
712 712
             return [
@@ -770,7 +770,7 @@  discard block
 block discarded – undo
770 770
             );
771 771
         }
772 772
 
773
-        return $this->bulk($id, $p, function ($node) use ($parent, $conflict) {
773
+        return $this->bulk($id, $p, function($node) use ($parent, $conflict) {
774 774
             $result = $node->setParent($parent, $conflict);
775 775
             if (NodeInterface::CONFLICT_RENAME === $conflict) {
776 776
                 return [
@@ -829,7 +829,7 @@  discard block
 block discarded – undo
829 829
             $at = $this->_verifyAttributes(['destroy' => $at])['destroy'];
830 830
         }
831 831
 
832
-        return $this->bulk($id, $p, function ($node) use ($force, $ignore_flag, $at) {
832
+        return $this->bulk($id, $p, function($node) use ($force, $ignore_flag, $at) {
833 833
             if (null === $at) {
834 834
                 $node->delete($force && $node->isDeleted() || $force && $ignore_flag);
835 835
             } else {
@@ -1425,7 +1425,7 @@  discard block
 block discarded – undo
1425 1425
         foreach ($attributes as $attribute => $value) {
1426 1426
             switch ($attribute) {
1427 1427
                 case 'filter':
1428
-                    $attributes['filter'] = json_encode((array) $attributes['filter']);
1428
+                    $attributes['filter'] = json_encode((array)$attributes['filter']);
1429 1429
 
1430 1430
                 break;
1431 1431
                 case 'destroy':
@@ -1440,14 +1440,14 @@  discard block
 block discarded – undo
1440 1440
                     if (!Helper::isValidTimestamp($value)) {
1441 1441
                         throw new Exception\InvalidArgument($attribute.' Changed timestamp must be valid unix timestamp');
1442 1442
                     }
1443
-                    if ((int) $value > time()) {
1443
+                    if ((int)$value > time()) {
1444 1444
                         throw new Exception\InvalidArgument($attribute.' timestamp can not be set greater than the server time');
1445 1445
                     }
1446 1446
                     $attributes[$attribute] = new UTCDateTime($value.'000');
1447 1447
 
1448 1448
                 break;
1449 1449
                 case 'readonly':
1450
-                    $attributes['readonly'] = (bool) $attributes['readonly'];
1450
+                    $attributes['readonly'] = (bool)$attributes['readonly'];
1451 1451
 
1452 1452
                 break;
1453 1453
             }
Please login to merge, or discard this patch.
src/app/Balloon.App.Notification/Hook/NewShareAdded.php 3 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
     /**
56 56
      * Constructor.
57 57
      *
58
-     * @param Notification $notifier
58
+     * @param Notifier $notifier
59 59
      * @param Server       $server
60 60
      */
61 61
     public function __construct(Notifier $notifier, Server $server, LoggerInterface $logger, TemplateHandler $template)
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
      * @param NodeInterface $node
130 130
      * @param User          $user
131 131
      *
132
-     * @return string
132
+     * @return boolean
133 133
      */
134 134
     protected function checkNotify(NodeInterface $node, User $user): bool
135 135
     {
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,6 @@
 block discarded – undo
14 14
 use Balloon\App\Notification\NodeMessage;
15 15
 use Balloon\App\Notification\Notifier;
16 16
 use Balloon\App\Notification\TemplateHandler;
17
-use Balloon\Async\Mail;
18 17
 use Balloon\Filesystem\Node\Collection;
19 18
 use Balloon\Filesystem\Node\NodeInterface;
20 19
 use Balloon\Hook\AbstractHook;
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 /**
6 6
  * balloon
@@ -105,13 +105,13 @@  discard block
 block discarded – undo
105 105
         $receiver = [];
106 106
         foreach ($node->getAcl() as $rule) {
107 107
             if ('user' === $rule['type']) {
108
-                if (!isset($receiver[(string) $rule['role']->getId()]) && $this->checkNotify($node, $rule['role'])) {
109
-                    $receiver[(string) $rule['role']->getId()] = $rule['role'];
108
+                if (!isset($receiver[(string)$rule['role']->getId()]) && $this->checkNotify($node, $rule['role'])) {
109
+                    $receiver[(string)$rule['role']->getId()] = $rule['role'];
110 110
                 }
111 111
             } elseif ('group' === $rule['type']) {
112 112
                 foreach ($rule['role']->getResolvedMember() as $user) {
113
-                    if (!isset($receiver[(string) $user->getId()]) && $this->checkNotify($node, $user)) {
114
-                        $receiver[(string) $user->getId()] = $user;
113
+                    if (!isset($receiver[(string)$user->getId()]) && $this->checkNotify($node, $user)) {
114
+                        $receiver[(string)$user->getId()] = $user;
115 115
                     }
116 116
                 }
117 117
             }
Please login to merge, or discard this patch.
src/app/Balloon.App.Notification/Hook/Subscription.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@
 block discarded – undo
64 64
     /**
65 65
      * Constructor.
66 66
      *
67
-     * @param Notification $notifier
67
+     * @param Notifier $notifier
68 68
      * @param Server       $server
69 69
      */
70 70
     public function __construct(Notifier $notifier, Server $server, TemplateHandler $template, LoggerInterface $logger, ?Iterable $config = null)
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,6 @@
 block discarded – undo
20 20
 use Balloon\Filesystem\Node\NodeInterface;
21 21
 use Balloon\Hook\AbstractHook;
22 22
 use Balloon\Server;
23
-use Balloon\Server\User;
24 23
 use MongoDB\BSON\UTCDateTime;
25 24
 use Psr\Log\LoggerInterface;
26 25
 
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 /**
6 6
  * balloon
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
         foreach ($config as $option => $value) {
93 93
             switch ($option) {
94 94
                 case 'notification_throttle':
95
-                    $this->{$option} = (int) $value;
95
+                    $this->{$option} = (int)$value;
96 96
 
97 97
                 break;
98 98
                 default:
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
     public function postCreateCollection(Collection $parent, Collection $node, bool $clone): void
110 110
     {
111 111
         $this->notify($node);
112
-        $user_id = (string) $this->server->getIdentity()->getId();
112
+        $user_id = (string)$this->server->getIdentity()->getId();
113 113
         $subs = $parent->getAppAttribute('Balloon\\App\\Notification', 'subscription');
114 114
 
115 115
         if (isset($subs[$user_id]) && $subs[$user_id]['recursive'] === true) {
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
         $parent = $node->getParent();
172 172
 
173 173
         if ($parent !== null) {
174
-            $subs = array_keys((array) $parent->getAppAttribute('Balloon\\App\\Notification', 'subscription'));
174
+            $subs = array_keys((array)$parent->getAppAttribute('Balloon\\App\\Notification', 'subscription'));
175 175
             $parents = $this->getReceiver($parent);
176 176
 
177 177
             $blacklist = array_diff($subs, $parents);
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
         $node->setAppAttribute('Balloon\\App\\Notification', 'subscription', $update);
224 224
 
225 225
         if ($this->server->getIdentity() !== null) {
226
-            $user_id = (string) $this->server->getIdentity()->getId();
226
+            $user_id = (string)$this->server->getIdentity()->getId();
227 227
             if (isset($subs[$user_id]) && $subs[$user_id]['exclude_me'] === true) {
228 228
                 $this->logger->debug('skip message for user ['.$user_id.'], user excludes own actions in node ['.$node->getId().']', [
229 229
                     'category' => get_class($this),
Please login to merge, or discard this patch.
src/app/Balloon.App.Notification/Notifier.php 2 patches
Doc Comments   +5 added lines, -7 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
      *
72 72
      * @param Database       $db
73 73
      * @param Server         $server
74
-     * @param LoggerInterace $logger
74
+     * @param LoggerInterface $logger
75 75
      * @param iterable       $config
76 76
      */
77 77
     public function __construct(Database $db, Server $server, LoggerInterface $logger, ?Iterable $config = null)
@@ -116,9 +116,7 @@  discard block
 block discarded – undo
116 116
      *
117 117
      * @param iterable $receiver
118 118
      * @param User     $sender
119
-     * @param string   $subject
120
-     * @param string   $body
121
-     * @param array    $context
119
+     * @param string    $context
122 120
      *
123 121
      * @return bool
124 122
      */
@@ -226,10 +224,10 @@  discard block
 block discarded – undo
226 224
     /**
227 225
      * Add notification.
228 226
      *
229
-     * @param array            $receiver
230
-     * @param User             $user
227
+     * @param User            $receiver
231 228
      * @param MessageInterface $message
232 229
      * @param array            $context
230
+     * @param User $sender
233 231
      *
234 232
      * @return ObjectId
235 233
      */
@@ -266,7 +264,7 @@  discard block
 block discarded – undo
266 264
     /**
267 265
      * Get notifications.
268 266
      *
269
-     * @param ObjectId $id
267
+     * @param User $id
270 268
      *
271 269
      * @return bool
272 270
      */
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 /**
6 6
  * balloon
@@ -301,7 +301,7 @@  discard block
 block discarded – undo
301 301
     public function subscribeNode(NodeInterface $node, bool $subscribe = true, bool $exclude_me = true, bool $recursive = false): bool
302 302
     {
303 303
         $subs = $node->getAppAttribute(__NAMESPACE__, 'subscription');
304
-        $user_id = (string) $this->server->getIdentity()->getId();
304
+        $user_id = (string)$this->server->getIdentity()->getId();
305 305
 
306 306
         if (true === $subscribe) {
307 307
             $this->logger->debug('user ['.$this->server->getIdentity()->getId().'] subribes node ['.$node->getId().']', [
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
             $subs[$user_id] = $subscription;
318 318
             $node->setAppAttribute(__NAMESPACE__, 'subscription', $subs);
319 319
             if ($node instanceof Collection && $recursive === true) {
320
-                $node->doRecursiveAction(function ($child) use ($subscription, $user_id) {
320
+                $node->doRecursiveAction(function($child) use ($subscription, $user_id) {
321 321
                     $subs = $child->getAppAttribute(__NAMESPACE__, 'subscription');
322 322
                     $subs[$user_id] = $subscription;
323 323
                     $child->setAppAttribute(__NAMESPACE__, 'subscription', $subs);
@@ -335,7 +335,7 @@  discard block
 block discarded – undo
335 335
             $node->setAppAttribute(__NAMESPACE__, 'subscription', $subs);
336 336
 
337 337
             if ($node instanceof Collection && $recursive === true) {
338
-                $node->doRecursiveAction(function ($child) use ($user_id) {
338
+                $node->doRecursiveAction(function($child) use ($user_id) {
339 339
                     $subs = $child->getAppAttribute(__NAMESPACE__, 'subscription');
340 340
 
341 341
                     if (isset($subs[$user_id])) {
Please login to merge, or discard this patch.
src/app/Balloon.App.Notification/TemplateHandler.php 2 patches
Doc Comments   +2 added lines, -7 removed lines patch added patch discarded remove patch
@@ -218,8 +218,6 @@  discard block
 block discarded – undo
218 218
     /**
219 219
      * Replace variables.
220 220
      *
221
-     * @param string $type
222
-     * @param User   $user
223 221
      */
224 222
     protected function decorate(string $template): string
225 223
     {
@@ -229,8 +227,6 @@  discard block
 block discarded – undo
229 227
     /**
230 228
      * Replace variables.
231 229
      *
232
-     * @param string $type
233
-     * @param User   $user
234 230
      */
235 231
     protected function decorateNode(string $template, NodeInterface $node): string
236 232
     {
@@ -248,7 +244,6 @@  discard block
 block discarded – undo
248 244
     /**
249 245
      * Replace variables.
250 246
      *
251
-     * @param string $type
252 247
      * @param User   $user
253 248
      */
254 249
     protected function decorateUser(string $template, User $user): string
@@ -267,9 +262,9 @@  discard block
 block discarded – undo
267 262
     /**
268 263
      * Get array value via string path.
269 264
      *
270
-     * @param iterable $arr
265
+     * @param iterable $array
271 266
      * @param string   $path
272
-     * @param string   $seperator
267
+     * @param string   $separator
273 268
      *
274 269
      * @return mixed
275 270
      */
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 /**
6 6
  * balloon
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
             switch ($option) {
121 121
                 case 'asset_dir':
122 122
                 case 'fallback_locale':
123
-                    $this->{$option} = (string) $value;
123
+                    $this->{$option} = (string)$value;
124 124
 
125 125
                 break;
126 126
                 default:
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
     {
237 237
         $decorator = $this->decorator;
238 238
 
239
-        return preg_replace_callback('/(\{node\.(([a-z]\.*)+)\})/', function ($match) use ($node, $decorator) {
239
+        return preg_replace_callback('/(\{node\.(([a-z]\.*)+)\})/', function($match) use ($node, $decorator) {
240 240
             $key = explode('.', $match[2]);
241 241
             $key = array_shift($key);
242 242
             $attrs = $decorator->decorate($node, [$key]);
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
     {
256 256
         $role_decorator = $this->role_decorator;
257 257
 
258
-        return preg_replace_callback('/(\{user\.(([a-z]\.*)+)\})/', function ($match) use ($user, $role_decorator) {
258
+        return preg_replace_callback('/(\{user\.(([a-z]\.*)+)\})/', function($match) use ($user, $role_decorator) {
259 259
             $key = explode('.', $match[2]);
260 260
             $key = array_shift($key);
261 261
             $attrs = $role_decorator->decorate($user, [$key]);
Please login to merge, or discard this patch.
src/lib/Bootstrap/AbstractBootstrap.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,6 @@
 block discarded – undo
11 11
 
12 12
 namespace Balloon\Bootstrap;
13 13
 
14
-use Balloon\App;
15 14
 use Composer\Autoload\ClassLoader as Composer;
16 15
 use ErrorException;
17 16
 use Micro\Container\Container;
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 /**
6 6
  * balloon
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
     protected function registerAppConstructors(array $apps): self
66 66
     {
67 67
         $context = $this->getContext();
68
-        $app_config = (array) $this->config['apps'];
68
+        $app_config = (array)$this->config['apps'];
69 69
 
70 70
         foreach ($apps as $app) {
71 71
             if (isset($app_config[$app])) {
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
     protected function loadAppConfigs(array $apps, Config $config)
103 103
     {
104 104
         $root = new Config(__DIR__.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'.container.config.php');
105
-        $app_config = (array) $config['apps'];
105
+        $app_config = (array)$config['apps'];
106 106
         $configs = [];
107 107
 
108 108
         foreach ($apps as $name => $config_path) {
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
      */
183 183
     protected function setErrorHandler(): self
184 184
     {
185
-        set_error_handler(function ($severity, $message, $file, $line) {
185
+        set_error_handler(function($severity, $message, $file, $line) {
186 186
             $log = $message.' in '.$file.':'.$line;
187 187
 
188 188
             if (null === $this->container) {
Please login to merge, or discard this patch.
src/lib/Filesystem/EventAttributeDecorator.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@
 block discarded – undo
100 100
      * @param string  $attribute
101 101
      * @param Closure $decorator
102 102
      *
103
-     * @return AttributeDecorator
103
+     * @return EventAttributeDecorator
104 104
      */
105 105
     public function addDecorator(string $attribute, Closure $decorator): self
106 106
     {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 /**
6 6
  * balloon
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
     protected function getAttributes(array $event): array
120 120
     {
121 121
         return [
122
-            'event' => (string) $event['_id'],
122
+            'event' => (string)$event['_id'],
123 123
             'timestamp' => $event['timestamp']->toDateTime()->format('c'),
124 124
             'operation' => $event['operation'],
125 125
             'name' => $event['name'],
Please login to merge, or discard this patch.
src/lib/Filesystem/Storage.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,6 @@
 block discarded – undo
13 13
 
14 14
 use Balloon\Filesystem\Node\File;
15 15
 use Balloon\Filesystem\Storage\Adapter\AdapterInterface;
16
-use Balloon\Filesystem\Storage\Adapter\Gridfs;
17 16
 use Psr\Log\LoggerInterface;
18 17
 
19 18
 class Storage
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 /**
6 6
  * balloon
Please login to merge, or discard this patch.
src/lib/Hook.php 2 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,6 @@
 block discarded – undo
44 44
     /**
45 45
      * Inject hook.
46 46
      *
47
-     * @param HookInterface $adapter
48 47
      *
49 48
      * @return Hook
50 49
      */
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 /**
6 6
  * balloon
Please login to merge, or discard this patch.