Test Setup Failed
Pull Request — master (#468)
by
unknown
02:01 queued 19s
created
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/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/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.
src/app/Balloon.App.Idp/GrantType/UserCredentialsMultiFactor.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@
 block discarded – undo
107 107
 
108 108
                 $this->server->getUserById($user['_id'])->setAttributes([
109 109
                 'multi_factor_recovery' => $codes,
110
-              ]);
110
+                ]);
111 111
 
112 112
                 $this->user = $user;
113 113
 
Please login to merge, or discard this patch.
src/app/Balloon.App.Elasticsearch/Job.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -296,7 +296,7 @@
 block discarded – undo
296 296
         }
297 297
 
298 298
         $this->logger->debug('elasticsarch blob document ['.$result['_id'].'] has no references left, remove completely', [
299
-         'category' => static::class,
299
+            'category' => static::class,
300 300
         ]);
301 301
 
302 302
         return $this->deleteBlob($result['_id']);
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
@@ -293,46 +293,46 @@  discard block
 block discarded – undo
293 293
         }
294 294
 
295 295
         return $response->setOutputFormat(null)
296
-          ->setBody(function () use ($node, $encode, $offset, $length) {
297
-              $mime = $node->getContentType();
298
-              $stream = $node->get();
299
-              $name = $node->getName();
300
-
301
-              if (null === $stream) {
302
-                  return;
303
-              }
304
-
305
-              if (0 !== $offset) {
306
-                  if (fseek($stream, $offset) === -1) {
307
-                      throw new Exception\Conflict('invalid offset requested', Exception\Conflict::INVALID_OFFSET);
308
-                  }
309
-              }
310
-
311
-              $read = 0;
312
-              header('Content-Type: '.$mime.'');
313
-              if ('base64' === $encode) {
314
-                  header('Content-Encoding: base64');
315
-                  while (!feof($stream)) {
316
-                      if (0 !== $length && $read + 8192 > $length) {
317
-                          echo base64_encode(fread($stream, $length - $read));
318
-                          exit();
319
-                      }
320
-
321
-                      echo base64_encode(fread($stream, 8192));
322
-                      $read += 8192;
323
-                  }
324
-              } else {
325
-                  while (!feof($stream)) {
326
-                      if (0 !== $length && $read + 8192 > $length) {
327
-                          echo fread($stream, $length - $read);
328
-                          exit();
329
-                      }
330
-
331
-                      echo fread($stream, 8192);
332
-                      $read += 8192;
333
-                  }
334
-              }
335
-          });
296
+            ->setBody(function () use ($node, $encode, $offset, $length) {
297
+                $mime = $node->getContentType();
298
+                $stream = $node->get();
299
+                $name = $node->getName();
300
+
301
+                if (null === $stream) {
302
+                    return;
303
+                }
304
+
305
+                if (0 !== $offset) {
306
+                    if (fseek($stream, $offset) === -1) {
307
+                        throw new Exception\Conflict('invalid offset requested', Exception\Conflict::INVALID_OFFSET);
308
+                    }
309
+                }
310
+
311
+                $read = 0;
312
+                header('Content-Type: '.$mime.'');
313
+                if ('base64' === $encode) {
314
+                    header('Content-Encoding: base64');
315
+                    while (!feof($stream)) {
316
+                        if (0 !== $length && $read + 8192 > $length) {
317
+                            echo base64_encode(fread($stream, $length - $read));
318
+                            exit();
319
+                        }
320
+
321
+                        echo base64_encode(fread($stream, 8192));
322
+                        $read += 8192;
323
+                    }
324
+                } else {
325
+                    while (!feof($stream)) {
326
+                        if (0 !== $length && $read + 8192 > $length) {
327
+                            echo fread($stream, $length - $read);
328
+                            exit();
329
+                        }
330
+
331
+                        echo fread($stream, 8192);
332
+                        $read += 8192;
333
+                    }
334
+                }
335
+            });
336 336
     }
337 337
 
338 338
     /**
@@ -1327,9 +1327,9 @@  discard block
 block discarded – undo
1327 1327
                 $node->zip($archive);
1328 1328
             } catch (\Exception $e) {
1329 1329
                 $this->logger->debug('failed zip node in multi node request ['.$node->getId().']', [
1330
-                   'category' => static::class,
1331
-                   'exception' => $e,
1332
-               ]);
1330
+                    'category' => static::class,
1331
+                    'exception' => $e,
1332
+                ]);
1333 1333
             }
1334 1334
         }
1335 1335
 
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
@@ -457,9 +457,9 @@
 block discarded – undo
457 457
                 $node->zip($archive);
458 458
             } catch (\Exception $e) {
459 459
                 $this->logger->debug('failed zip node in multi node request ['.$node->getId().']', [
460
-                   'category' => static::class,
461
-                   'exception' => $e,
462
-               ]);
460
+                    'category' => static::class,
461
+                    'exception' => $e,
462
+                ]);
463 463
             }
464 464
         }
465 465
 
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
@@ -239,8 +239,8 @@  discard block
 block discarded – undo
239 239
             $share = $node->getFilesystem()->findRawNode($node->getReference());
240 240
         } catch (\Exception $e) {
241 241
             $this->logger->error('could not find share node ['.$node->getReference().'] for reference ['.$node->getId().'], dead reference?', [
242
-                 'category' => static::class,
243
-                 'exception' => $e,
242
+                    'category' => static::class,
243
+                    'exception' => $e,
244 244
             ]);
245 245
 
246 246
             return self::PRIVILEGE_DENY;
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
 
249 249
         if ($share['deleted'] instanceof UTCDateTime || true !== $share['shared']) {
250 250
             $this->logger->error('share node ['.$share['_id'].'] has been deleted, dead reference?', [
251
-                 'category' => static::class,
251
+                    'category' => static::class,
252 252
             ]);
253 253
 
254 254
             return self::PRIVILEGE_DENY;
Please login to merge, or discard this patch.