Completed
Push — master ( 541bbf...1b6ffa )
by Raffael
07:41 queued 03:49
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/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.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/Template.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -85,6 +85,6 @@
 block discarded – undo
85 85
     protected function getTemplate(): string
86 86
     {
87 87
         return __DIR__.DIRECTORY_SEPARATOR.'assets'
88
-          .DIRECTORY_SEPARATOR.'template.'.$this->type;
88
+            .DIRECTORY_SEPARATOR.'template.'.$this->type;
89 89
     }
90 90
 }
Please login to merge, or discard this patch.
src/app/Balloon.App.Api/v1/Node.php 1 patch
Indentation   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -284,46 +284,46 @@  discard block
 block discarded – undo
284 284
         }
285 285
 
286 286
         return $response->setOutputFormat(null)
287
-          ->setBody(function () use ($node, $encode, $offset, $length) {
288
-              $mime = $node->getContentType();
289
-              $stream = $node->get();
290
-              $name = $node->getName();
291
-
292
-              if (null === $stream) {
293
-                  return;
294
-              }
295
-
296
-              if (0 !== $offset) {
297
-                  if (fseek($stream, $offset) === -1) {
298
-                      throw new Exception\Conflict('invalid offset requested', Exception\Conflict::INVALID_OFFSET);
299
-                  }
300
-              }
301
-
302
-              $read = 0;
303
-              header('Content-Type: '.$mime.'');
304
-              if ('base64' === $encode) {
305
-                  header('Content-Encoding: base64');
306
-                  while (!feof($stream)) {
307
-                      if (0 !== $length && $read + 8192 > $length) {
308
-                          echo base64_encode(fread($stream, $length - $read));
309
-                          exit();
310
-                      }
311
-
312
-                      echo base64_encode(fread($stream, 8192));
313
-                      $read += 8192;
314
-                  }
315
-              } else {
316
-                  while (!feof($stream)) {
317
-                      if (0 !== $length && $read + 8192 > $length) {
318
-                          echo fread($stream, $length - $read);
319
-                          exit();
320
-                      }
321
-
322
-                      echo fread($stream, 8192);
323
-                      $read += 8192;
324
-                  }
325
-              }
326
-          });
287
+            ->setBody(function () use ($node, $encode, $offset, $length) {
288
+                $mime = $node->getContentType();
289
+                $stream = $node->get();
290
+                $name = $node->getName();
291
+
292
+                if (null === $stream) {
293
+                    return;
294
+                }
295
+
296
+                if (0 !== $offset) {
297
+                    if (fseek($stream, $offset) === -1) {
298
+                        throw new Exception\Conflict('invalid offset requested', Exception\Conflict::INVALID_OFFSET);
299
+                    }
300
+                }
301
+
302
+                $read = 0;
303
+                header('Content-Type: '.$mime.'');
304
+                if ('base64' === $encode) {
305
+                    header('Content-Encoding: base64');
306
+                    while (!feof($stream)) {
307
+                        if (0 !== $length && $read + 8192 > $length) {
308
+                            echo base64_encode(fread($stream, $length - $read));
309
+                            exit();
310
+                        }
311
+
312
+                        echo base64_encode(fread($stream, 8192));
313
+                        $read += 8192;
314
+                    }
315
+                } else {
316
+                    while (!feof($stream)) {
317
+                        if (0 !== $length && $read + 8192 > $length) {
318
+                            echo fread($stream, $length - $read);
319
+                            exit();
320
+                        }
321
+
322
+                        echo fread($stream, 8192);
323
+                        $read += 8192;
324
+                    }
325
+                }
326
+            });
327 327
     }
328 328
 
329 329
     /**
@@ -1318,9 +1318,9 @@  discard block
 block discarded – undo
1318 1318
                 $node->zip($archive);
1319 1319
             } catch (\Exception $e) {
1320 1320
                 $this->logger->debug('failed zip node in multi node request ['.$node->getId().']', [
1321
-                   'category' => get_class($this),
1322
-                   'exception' => $e,
1323
-               ]);
1321
+                    'category' => get_class($this),
1322
+                    'exception' => $e,
1323
+                ]);
1324 1324
             }
1325 1325
         }
1326 1326
 
Please login to merge, or discard this patch.
src/app/Balloon.App.Api/Helper.php 1 patch
Indentation   +64 added lines, -64 removed lines patch added patch discarded remove patch
@@ -40,69 +40,69 @@
 block discarded – undo
40 40
         }
41 41
 
42 42
         return $response
43
-          ->setOutputFormat(null)
44
-          ->setBody(function () use ($file) {
45
-              $stream = $file->get();
46
-              $name = $file->getName();
47
-
48
-              if (null === $stream) {
49
-                  return;
50
-              }
51
-
52
-              $size = $file->getSize();
53
-              $length = $size;
54
-              $start = 0;
55
-              $end = $size - 1;
56
-
57
-              set_time_limit(0);
58
-              if (isset($_SERVER['HTTP_RANGE']) && strpos($_SERVER['HTTP_RANGE'], '=') !== false) {
59
-                  header('Accept-Ranges: bytes');
60
-                  $c_start = $start;
61
-                  $c_end = $end;
62
-                  list(, $range) = explode('=', $_SERVER['HTTP_RANGE'], 2);
63
-
64
-                  if (strpos($range, ',') !== false) {
65
-                      header("Content-Range: bytes $start-$end/$size");
66
-
67
-                      throw new Exception\InvalidRange('invalid offset/limit requested');
68
-                  }
69
-
70
-                  if ($range == '-') {
71
-                      $c_start = $size - substr($range, 1);
72
-                  } else {
73
-                      $range = explode('-', $range);
74
-                      $c_start = $range[0];
75
-                      $c_end = (isset($range[1]) && is_numeric($range[1])) ? $range[1] : $size;
76
-                  }
77
-
78
-                  $c_end = ($c_end > $end) ? $end : $c_end;
79
-                  if ($c_start > $c_end || $c_start > $size - 1 || $c_end >= $size) {
80
-                      header("Content-Range: bytes $start-$end/$size");
81
-
82
-                      throw new Exception\InvalidRange('invalid offset/limit requested');
83
-                  }
84
-
85
-                  $start = (int) $c_start;
86
-                  $end = (int) $c_end;
87
-                  $length = (int) $end - $start + 1;
88
-                  fseek($stream, $start);
89
-                  header('HTTP/1.1 206 Partial Content');
90
-                  header("Content-Range: bytes $start-$end/$size");
91
-              }
92
-
93
-              header('Content-Length: '.$length);
94
-              $buffer = 1024 * 8;
95
-
96
-              while (!feof($stream) && ($p = ftell($stream)) <= $end) {
97
-                  if ($p + $buffer > $end) {
98
-                      $buffer = $end - $p + 1;
99
-                  }
100
-
101
-                  echo fread($stream, $buffer);
102
-                  flush();
103
-              }
104
-
105
-              fclose($stream);
106
-          });
43
+            ->setOutputFormat(null)
44
+            ->setBody(function () use ($file) {
45
+                $stream = $file->get();
46
+                $name = $file->getName();
47
+
48
+                if (null === $stream) {
49
+                    return;
50
+                }
51
+
52
+                $size = $file->getSize();
53
+                $length = $size;
54
+                $start = 0;
55
+                $end = $size - 1;
56
+
57
+                set_time_limit(0);
58
+                if (isset($_SERVER['HTTP_RANGE']) && strpos($_SERVER['HTTP_RANGE'], '=') !== false) {
59
+                    header('Accept-Ranges: bytes');
60
+                    $c_start = $start;
61
+                    $c_end = $end;
62
+                    list(, $range) = explode('=', $_SERVER['HTTP_RANGE'], 2);
63
+
64
+                    if (strpos($range, ',') !== false) {
65
+                        header("Content-Range: bytes $start-$end/$size");
66
+
67
+                        throw new Exception\InvalidRange('invalid offset/limit requested');
68
+                    }
69
+
70
+                    if ($range == '-') {
71
+                        $c_start = $size - substr($range, 1);
72
+                    } else {
73
+                        $range = explode('-', $range);
74
+                        $c_start = $range[0];
75
+                        $c_end = (isset($range[1]) && is_numeric($range[1])) ? $range[1] : $size;
76
+                    }
77
+
78
+                    $c_end = ($c_end > $end) ? $end : $c_end;
79
+                    if ($c_start > $c_end || $c_start > $size - 1 || $c_end >= $size) {
80
+                        header("Content-Range: bytes $start-$end/$size");
81
+
82
+                        throw new Exception\InvalidRange('invalid offset/limit requested');
83
+                    }
84
+
85
+                    $start = (int) $c_start;
86
+                    $end = (int) $c_end;
87
+                    $length = (int) $end - $start + 1;
88
+                    fseek($stream, $start);
89
+                    header('HTTP/1.1 206 Partial Content');
90
+                    header("Content-Range: bytes $start-$end/$size");
91
+                }
92
+
93
+                header('Content-Length: '.$length);
94
+                $buffer = 1024 * 8;
95
+
96
+                while (!feof($stream) && ($p = ftell($stream)) <= $end) {
97
+                    if ($p + $buffer > $end) {
98
+                        $buffer = $end - $p + 1;
99
+                    }
100
+
101
+                    echo fread($stream, $buffer);
102
+                    flush();
103
+                }
104
+
105
+                fclose($stream);
106
+            });
107 107
     }
108 108
 }
Please login to merge, or discard this patch.