@@ -49,7 +49,7 @@ |
||
49 | 49 | 'foreignField' => '_id', |
50 | 50 | 'localField' => 'history.storage._id', |
51 | 51 | 'as' => 'blob', |
52 | - ]], |
|
52 | + ]], |
|
53 | 53 | ]); |
54 | 54 | |
55 | 55 | foreach ($cursor as $object) { |
@@ -101,7 +101,7 @@ |
||
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; |
@@ -114,10 +114,10 @@ |
||
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'); |
@@ -256,9 +256,9 @@ |
||
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'); |
@@ -533,7 +533,7 @@ discard block |
||
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 |
||
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 |
||
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) { |
@@ -278,49 +278,49 @@ discard block |
||
278 | 278 | } |
279 | 279 | |
280 | 280 | return $response->setOutputFormat(null) |
281 | - ->setBody(function () use ($node, $encode, $offset, $length) { |
|
282 | - $mime = $node->getContentType(); |
|
283 | - $stream = $node->get(); |
|
284 | - $name = $node->getName(); |
|
285 | - |
|
286 | - if (null === $stream) { |
|
287 | - return; |
|
288 | - } |
|
289 | - |
|
290 | - if (0 !== $offset) { |
|
291 | - if (fseek($stream, $offset) === -1) { |
|
292 | - throw new Exception\Conflict( |
|
281 | + ->setBody(function () use ($node, $encode, $offset, $length) { |
|
282 | + $mime = $node->getContentType(); |
|
283 | + $stream = $node->get(); |
|
284 | + $name = $node->getName(); |
|
285 | + |
|
286 | + if (null === $stream) { |
|
287 | + return; |
|
288 | + } |
|
289 | + |
|
290 | + if (0 !== $offset) { |
|
291 | + if (fseek($stream, $offset) === -1) { |
|
292 | + throw new Exception\Conflict( |
|
293 | 293 | 'invalid offset requested', |
294 | 294 | Exception\Conflict::INVALID_OFFSET |
295 | 295 | ); |
296 | - } |
|
297 | - } |
|
298 | - |
|
299 | - $read = 0; |
|
300 | - header('Content-Type: '.$mime.''); |
|
301 | - if ('base64' === $encode) { |
|
302 | - header('Content-Encoding: base64'); |
|
303 | - while (!feof($stream)) { |
|
304 | - if (0 !== $length && $read + 8192 > $length) { |
|
305 | - echo base64_encode(fread($stream, $length - $read)); |
|
306 | - exit(); |
|
307 | - } |
|
308 | - |
|
309 | - echo base64_encode(fread($stream, 8192)); |
|
310 | - $read += 8192; |
|
311 | - } |
|
312 | - } else { |
|
313 | - while (!feof($stream)) { |
|
314 | - if (0 !== $length && $read + 8192 > $length) { |
|
315 | - echo fread($stream, $length - $read); |
|
316 | - exit(); |
|
317 | - } |
|
318 | - |
|
319 | - echo fread($stream, 8192); |
|
320 | - $read += 8192; |
|
321 | - } |
|
322 | - } |
|
323 | - }); |
|
296 | + } |
|
297 | + } |
|
298 | + |
|
299 | + $read = 0; |
|
300 | + header('Content-Type: '.$mime.''); |
|
301 | + if ('base64' === $encode) { |
|
302 | + header('Content-Encoding: base64'); |
|
303 | + while (!feof($stream)) { |
|
304 | + if (0 !== $length && $read + 8192 > $length) { |
|
305 | + echo base64_encode(fread($stream, $length - $read)); |
|
306 | + exit(); |
|
307 | + } |
|
308 | + |
|
309 | + echo base64_encode(fread($stream, 8192)); |
|
310 | + $read += 8192; |
|
311 | + } |
|
312 | + } else { |
|
313 | + while (!feof($stream)) { |
|
314 | + if (0 !== $length && $read + 8192 > $length) { |
|
315 | + echo fread($stream, $length - $read); |
|
316 | + exit(); |
|
317 | + } |
|
318 | + |
|
319 | + echo fread($stream, 8192); |
|
320 | + $read += 8192; |
|
321 | + } |
|
322 | + } |
|
323 | + }); |
|
324 | 324 | } |
325 | 325 | |
326 | 326 | /** |
@@ -1321,9 +1321,9 @@ discard block |
||
1321 | 1321 | $node->zip($archive); |
1322 | 1322 | } catch (\Exception $e) { |
1323 | 1323 | $this->logger->debug('failed zip node in multi node request ['.$node->getId().']', [ |
1324 | - 'category' => get_class($this), |
|
1325 | - 'exception' => $e, |
|
1326 | - ]); |
|
1324 | + 'category' => get_class($this), |
|
1325 | + 'exception' => $e, |
|
1326 | + ]); |
|
1327 | 1327 | } |
1328 | 1328 | } |
1329 | 1329 |
@@ -367,7 +367,7 @@ |
||
367 | 367 | |
368 | 368 | throw new Exception\InsufficientStorage( |
369 | 369 | 'user quota is full', |
370 | - Exception\InsufficientStorage::USER_QUOTA_FULL |
|
370 | + Exception\InsufficientStorage::USER_QUOTA_FULL |
|
371 | 371 | ); |
372 | 372 | } |
373 | 373 |
@@ -365,7 +365,7 @@ |
||
365 | 365 | if (!$this->_acl->isAllowed($this, 'm')) { |
366 | 366 | throw new ForbiddenException( |
367 | 367 | 'not allowed to update acl', |
368 | - ForbiddenException::NOT_ALLOWED_TO_MANAGE |
|
368 | + ForbiddenException::NOT_ALLOWED_TO_MANAGE |
|
369 | 369 | ); |
370 | 370 | } |
371 | 371 |
@@ -770,8 +770,8 @@ |
||
770 | 770 | { |
771 | 771 | if (!$this->_acl->isAllowed($this, 'm')) { |
772 | 772 | throw new ForbiddenException( |
773 | - 'not allowed to set acl', |
|
774 | - ForbiddenException::NOT_ALLOWED_TO_MANAGE |
|
773 | + 'not allowed to set acl', |
|
774 | + ForbiddenException::NOT_ALLOWED_TO_MANAGE |
|
775 | 775 | ); |
776 | 776 | } |
777 | 777 |