Completed
Push — master ( b97427...e235cc )
by Raffael
30:35 queued 26:08
created
src/app/Balloon.App.Notification/Api/v2/Notifications.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -256,9 +256,9 @@
 block discarded – undo
256 256
         $body->setParts([$html, $plain]);
257 257
 
258 258
         $mail = (new Message())
259
-          ->setSubject($message->getSubject())
260
-          ->setBody($body)
261
-          ->setEncoding('UTF-8');
259
+            ->setSubject($message->getSubject())
260
+            ->setBody($body)
261
+            ->setEncoding('UTF-8');
262 262
 
263 263
         $type = $mail->getHeaders()->get('Content-Type');
264 264
         $type->setType('multipart/alternative');
Please login to merge, or discard this patch.
src/lib/Server.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -533,7 +533,7 @@  discard block
 block discarded – undo
533 533
 
534 534
         $this->identity = $user;
535 535
         $user->updateIdentity($identity)
536
-             ->updateShares();
536
+                ->updateShares();
537 537
         $this->hook->run('postServerIdentity', [$user]);
538 538
 
539 539
         return true;
@@ -642,7 +642,7 @@  discard block
 block discarded – undo
642 642
     public function getGroupByName(string $name): Group
643 643
     {
644 644
         $group = $this->db->group->findOne([
645
-           'name' => $name,
645
+            'name' => $name,
646 646
         ]);
647 647
 
648 648
         if (null === $group) {
@@ -664,7 +664,7 @@  discard block
 block discarded – undo
664 664
         }
665 665
 
666 666
         $group = $this->db->group->findOne([
667
-           '_id' => $id,
667
+            '_id' => $id,
668 668
         ]);
669 669
 
670 670
         if (null === $group) {
Please login to merge, or discard this patch.
src/app/Balloon.App.Api/v2/Nodes.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -958,9 +958,9 @@
 block discarded – undo
958 958
                 $node->zip($archive);
959 959
             } catch (\Exception $e) {
960 960
                 $this->logger->debug('failed zip node in multi node request ['.$node->getId().']', [
961
-                   'category' => get_class($this),
962
-                   'exception' => $e,
963
-               ]);
961
+                    'category' => get_class($this),
962
+                    'exception' => $e,
963
+                ]);
964 964
             }
965 965
         }
966 966
 
Please login to merge, or discard this patch.
src/app/Balloon.App.Api/Helper.php 1 patch
Indentation   +63 added lines, -63 removed lines patch added patch discarded remove patch
@@ -34,68 +34,68 @@
 block discarded – undo
34 34
         }
35 35
 
36 36
         return $response
37
-          ->setOutputFormat(null)
38
-          ->setBody(function () use ($file) {
39
-              $stream = $file->get();
40
-              $name = $file->getName();
41
-
42
-              if (null === $stream) {
43
-                  return;
44
-              }
45
-
46
-              $size = $file->getSize();
47
-              $length = $size;
48
-              $start = 0;
49
-              $end = $size - 1;
50
-
51
-              if (isset($_SERVER['HTTP_RANGE'])) {
52
-                  header('Accept-Ranges: bytes');
53
-                  $c_start = $start;
54
-                  $c_end = $end;
55
-                  list(, $range) = explode('=', $_SERVER['HTTP_RANGE'], 2);
56
-
57
-                  if (strpos($range, ',') !== false) {
58
-                      header("Content-Range: bytes $start-$end/$size");
59
-
60
-                      throw new Exception\InvalidRange('invalid offset/limit requested');
61
-                  }
62
-
63
-                  if ($range == '-') {
64
-                      $c_start = $size - substr($range, 1);
65
-                  } else {
66
-                      $range = explode('-', $range);
67
-                      $c_start = $range[0];
68
-                      $c_end = (isset($range[1]) && is_numeric($range[1])) ? $range[1] : $size;
69
-                  }
70
-
71
-                  $c_end = ($c_end > $end) ? $end : $c_end;
72
-                  if ($c_start > $c_end || $c_start > $size - 1 || $c_end >= $size) {
73
-                      header("Content-Range: bytes $start-$end/$size");
74
-
75
-                      throw new Exception\InvalidRange('invalid offset/limit requested');
76
-                  }
77
-
78
-                  $start = (int) $c_start;
79
-                  $end = (int) $c_end;
80
-                  $length = (int) $end - $start + 1;
81
-                  fseek($stream, $start);
82
-                  header('HTTP/1.1 206 Partial Content');
83
-                  header("Content-Range: bytes $start-$end/$size");
84
-              }
85
-
86
-              header('Content-Length: '.$length);
87
-              $buffer = 1024 * 8;
88
-
89
-              while (!feof($stream) && ($p = ftell($stream)) <= $end) {
90
-                  if ($p + $buffer > $end) {
91
-                      $buffer = $end - $p + 1;
92
-                  }
93
-
94
-                  echo fread($stream, $buffer);
95
-                  flush();
96
-              }
97
-
98
-              fclose($stream);
99
-          });
37
+            ->setOutputFormat(null)
38
+            ->setBody(function () use ($file) {
39
+                $stream = $file->get();
40
+                $name = $file->getName();
41
+
42
+                if (null === $stream) {
43
+                    return;
44
+                }
45
+
46
+                $size = $file->getSize();
47
+                $length = $size;
48
+                $start = 0;
49
+                $end = $size - 1;
50
+
51
+                if (isset($_SERVER['HTTP_RANGE'])) {
52
+                    header('Accept-Ranges: bytes');
53
+                    $c_start = $start;
54
+                    $c_end = $end;
55
+                    list(, $range) = explode('=', $_SERVER['HTTP_RANGE'], 2);
56
+
57
+                    if (strpos($range, ',') !== false) {
58
+                        header("Content-Range: bytes $start-$end/$size");
59
+
60
+                        throw new Exception\InvalidRange('invalid offset/limit requested');
61
+                    }
62
+
63
+                    if ($range == '-') {
64
+                        $c_start = $size - substr($range, 1);
65
+                    } else {
66
+                        $range = explode('-', $range);
67
+                        $c_start = $range[0];
68
+                        $c_end = (isset($range[1]) && is_numeric($range[1])) ? $range[1] : $size;
69
+                    }
70
+
71
+                    $c_end = ($c_end > $end) ? $end : $c_end;
72
+                    if ($c_start > $c_end || $c_start > $size - 1 || $c_end >= $size) {
73
+                        header("Content-Range: bytes $start-$end/$size");
74
+
75
+                        throw new Exception\InvalidRange('invalid offset/limit requested');
76
+                    }
77
+
78
+                    $start = (int) $c_start;
79
+                    $end = (int) $c_end;
80
+                    $length = (int) $end - $start + 1;
81
+                    fseek($stream, $start);
82
+                    header('HTTP/1.1 206 Partial Content');
83
+                    header("Content-Range: bytes $start-$end/$size");
84
+                }
85
+
86
+                header('Content-Length: '.$length);
87
+                $buffer = 1024 * 8;
88
+
89
+                while (!feof($stream) && ($p = ftell($stream)) <= $end) {
90
+                    if ($p + $buffer > $end) {
91
+                        $buffer = $end - $p + 1;
92
+                    }
93
+
94
+                    echo fread($stream, $buffer);
95
+                    flush();
96
+                }
97
+
98
+                fclose($stream);
99
+            });
100 100
     }
101 101
 }
Please login to merge, or discard this patch.
src/lib/Migration/Delta/SetPointerId.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
             $this->db->storage->updateOne(
50 50
                 ['_id' => $object['_id']],
51 51
                 [
52
-                   '$set' => ['pointer' => $pointer],
52
+                    '$set' => ['pointer' => $pointer],
53 53
                 ]
54 54
             );
55 55
         }
Please login to merge, or discard this patch.
src/app/Balloon.App.Api/v1/Node.php 1 patch
Indentation   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -287,49 +287,49 @@  discard block
 block discarded – undo
287 287
         }
288 288
 
289 289
         return $response->setOutputFormat(null)
290
-          ->setBody(function () use ($node, $encode, $offset, $length) {
291
-              $mime = $node->getContentType();
292
-              $stream = $node->get();
293
-              $name = $node->getName();
294
-
295
-              if (null === $stream) {
296
-                  return;
297
-              }
298
-
299
-              if (0 !== $offset) {
300
-                  if (fseek($stream, $offset) === -1) {
301
-                      throw new Exception\Conflict(
302
-                          'invalid offset requested',
303
-                          Exception\Conflict::INVALID_OFFSET
290
+            ->setBody(function () use ($node, $encode, $offset, $length) {
291
+                $mime = $node->getContentType();
292
+                $stream = $node->get();
293
+                $name = $node->getName();
294
+
295
+                if (null === $stream) {
296
+                    return;
297
+                }
298
+
299
+                if (0 !== $offset) {
300
+                    if (fseek($stream, $offset) === -1) {
301
+                        throw new Exception\Conflict(
302
+                            'invalid offset requested',
303
+                            Exception\Conflict::INVALID_OFFSET
304 304
                     );
305
-                  }
306
-              }
307
-
308
-              $read = 0;
309
-              header('Content-Type: '.$mime.'');
310
-              if ('base64' === $encode) {
311
-                  header('Content-Encoding: base64');
312
-                  while (!feof($stream)) {
313
-                      if (0 !== $length && $read + 8192 > $length) {
314
-                          echo base64_encode(fread($stream, $length - $read));
315
-                          exit();
316
-                      }
317
-
318
-                      echo base64_encode(fread($stream, 8192));
319
-                      $read += 8192;
320
-                  }
321
-              } else {
322
-                  while (!feof($stream)) {
323
-                      if (0 !== $length && $read + 8192 > $length) {
324
-                          echo fread($stream, $length - $read);
325
-                          exit();
326
-                      }
327
-
328
-                      echo fread($stream, 8192);
329
-                      $read += 8192;
330
-                  }
331
-              }
332
-          });
305
+                    }
306
+                }
307
+
308
+                $read = 0;
309
+                header('Content-Type: '.$mime.'');
310
+                if ('base64' === $encode) {
311
+                    header('Content-Encoding: base64');
312
+                    while (!feof($stream)) {
313
+                        if (0 !== $length && $read + 8192 > $length) {
314
+                            echo base64_encode(fread($stream, $length - $read));
315
+                            exit();
316
+                        }
317
+
318
+                        echo base64_encode(fread($stream, 8192));
319
+                        $read += 8192;
320
+                    }
321
+                } else {
322
+                    while (!feof($stream)) {
323
+                        if (0 !== $length && $read + 8192 > $length) {
324
+                            echo fread($stream, $length - $read);
325
+                            exit();
326
+                        }
327
+
328
+                        echo fread($stream, 8192);
329
+                        $read += 8192;
330
+                    }
331
+                }
332
+            });
333 333
     }
334 334
 
335 335
     /**
@@ -1330,9 +1330,9 @@  discard block
 block discarded – undo
1330 1330
                 $node->zip($archive);
1331 1331
             } catch (\Exception $e) {
1332 1332
                 $this->logger->debug('failed zip node in multi node request ['.$node->getId().']', [
1333
-                   'category' => get_class($this),
1334
-                   'exception' => $e,
1335
-               ]);
1333
+                    'category' => get_class($this),
1334
+                    'exception' => $e,
1335
+                ]);
1336 1336
             }
1337 1337
         }
1338 1338
 
Please login to merge, or discard this patch.
src/app/Balloon.App.Idp/Api/v2/Tokens.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
         $params = $response->getParameters();
44 44
 
45 45
         return (new Response())
46
-             ->setCode($response->getStatusCode())
47
-             ->setBody($params);
46
+                ->setCode($response->getStatusCode())
47
+                ->setBody($params);
48 48
     }
49 49
 }
Please login to merge, or discard this patch.
src/lib/Filesystem/Acl.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -246,8 +246,8 @@  discard block
 block discarded – undo
246 246
             $share = $node->getFilesystem()->findRawNode($node->getReference());
247 247
         } catch (\Exception $e) {
248 248
             $this->logger->error('could not find share node ['.$node->getReference().'] for reference ['.$node->getId().'], dead reference?', [
249
-                 'category' => get_class($this),
250
-                 'exception' => $e,
249
+                    'category' => get_class($this),
250
+                    'exception' => $e,
251 251
             ]);
252 252
 
253 253
             return self::PRIVILEGE_DENY;
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
 
256 256
         if ($share['deleted'] instanceof UTCDateTime || true !== $share['shared']) {
257 257
             $this->logger->error('share node ['.$share['_id'].'] has been deleted, dead reference?', [
258
-                 'category' => get_class($this),
258
+                    'category' => get_class($this),
259 259
             ]);
260 260
 
261 261
             return self::PRIVILEGE_DENY;
Please login to merge, or discard this patch.
src/app/Balloon.App.Wopi/Session/Session.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@
 block discarded – undo
103 103
             //'FileSharingUrl' => null,
104 104
             //'FileUrl' => null,
105 105
             'FileVersionPostMessage' => true,
106
-           // 'FileSharingPostMessage' => null,
106
+            // 'FileSharingPostMessage' => null,
107 107
             'PostMessageOrigin' => $this->session['client'],
108 108
             'OwnerId' => (string) $this->file->getOwner(),
109 109
             'ReadOnly' => $this->file->isReadonly(),
Please login to merge, or discard this patch.