@@ -734,8 +734,8 @@ |
||
| 734 | 734 | |
| 735 | 735 | $ops[] = [ |
| 736 | 736 | '$sort' => [ |
| 737 | - 'sum' => -1, |
|
| 738 | - '_id' => 1, |
|
| 737 | + 'sum' => -1, |
|
| 738 | + '_id' => 1, |
|
| 739 | 739 | ], |
| 740 | 740 | ]; |
| 741 | 741 | |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | /** |
| 6 | 6 | * balloon |
@@ -288,7 +288,7 @@ discard block |
||
| 288 | 288 | } |
| 289 | 289 | |
| 290 | 290 | if (true === $string) { |
| 291 | - $found[] = (string) $share; |
|
| 291 | + $found[] = (string)$share; |
|
| 292 | 292 | } else { |
| 293 | 293 | $found[] = $share; |
| 294 | 294 | } |
@@ -390,7 +390,7 @@ discard block |
||
| 390 | 390 | '$or' => [ |
| 391 | 391 | ['acl' => [ |
| 392 | 392 | '$elemMatch' => [ |
| 393 | - 'id' => (string) $this->_id, |
|
| 393 | + 'id' => (string)$this->_id, |
|
| 394 | 394 | 'type' => 'user', |
| 395 | 395 | ], |
| 396 | 396 | ]], |
@@ -407,7 +407,7 @@ discard block |
||
| 407 | 407 | $list = []; |
| 408 | 408 | foreach ($item as $child) { |
| 409 | 409 | $found[] = $child['_id']; |
| 410 | - $list[(string) $child['_id']] = $child; |
|
| 410 | + $list[(string)$child['_id']] = $child; |
|
| 411 | 411 | } |
| 412 | 412 | |
| 413 | 413 | if (empty($found)) { |
@@ -444,7 +444,7 @@ discard block |
||
| 444 | 444 | |
| 445 | 445 | $new = array_diff($found, $exists); |
| 446 | 446 | foreach ($new as $add) { |
| 447 | - $node = $list[(string) $add]; |
|
| 447 | + $node = $list[(string)$add]; |
|
| 448 | 448 | |
| 449 | 449 | $this->logger->info('found new share ['.$node['_id'].']', [ |
| 450 | 450 | 'category' => get_class($this), |
@@ -527,7 +527,7 @@ discard block |
||
| 527 | 527 | */ |
| 528 | 528 | public function setHardQuota(int $quota): self |
| 529 | 529 | { |
| 530 | - $this->hard_quota = (int) $quota; |
|
| 530 | + $this->hard_quota = (int)$quota; |
|
| 531 | 531 | $this->save(['hard_quota']); |
| 532 | 532 | |
| 533 | 533 | return $this; |
@@ -542,7 +542,7 @@ discard block |
||
| 542 | 542 | */ |
| 543 | 543 | public function setSoftQuota(int $quota): self |
| 544 | 544 | { |
| 545 | - $this->soft_quota = (int) $quota; |
|
| 545 | + $this->soft_quota = (int)$quota; |
|
| 546 | 546 | $this->save(['soft_quota']); |
| 547 | 547 | |
| 548 | 548 | return $this; |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | /** |
| 6 | 6 | * balloon |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | foreach ($config as $option => $value) { |
| 58 | 58 | switch ($option) { |
| 59 | 59 | case 'interval': |
| 60 | - $this->{$option} = (int) $value; |
|
| 60 | + $this->{$option} = (int)$value; |
|
| 61 | 61 | |
| 62 | 62 | break; |
| 63 | 63 | default: |
@@ -1,6 +1,6 @@ discard block |
||
| 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 |
||
| 65 | 65 | switch ($option) { |
| 66 | 66 | case 'max_age': |
| 67 | 67 | case 'interval': |
| 68 | - $this->{$option} = (int) $value; |
|
| 68 | + $this->{$option} = (int)$value; |
|
| 69 | 69 | |
| 70 | 70 | break; |
| 71 | 71 | default: |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | /** |
| 6 | 6 | * balloon |
@@ -110,15 +110,15 @@ discard block |
||
| 110 | 110 | |
| 111 | 111 | switch ($value['type']) { |
| 112 | 112 | case 'string': |
| 113 | - $attributes[$attr] = (string) $value['value']; |
|
| 113 | + $attributes[$attr] = (string)$value['value']; |
|
| 114 | 114 | |
| 115 | 115 | break; |
| 116 | 116 | case 'int': |
| 117 | - $attributes[$attr] = (int) $value['value']; |
|
| 117 | + $attributes[$attr] = (int)$value['value']; |
|
| 118 | 118 | |
| 119 | 119 | break; |
| 120 | 120 | case 'bool': |
| 121 | - $attributes[$attr] = (bool) $value['value']; |
|
| 121 | + $attributes[$attr] = (bool)$value['value']; |
|
| 122 | 122 | |
| 123 | 123 | break; |
| 124 | 124 | case 'binary': |
@@ -90,7 +90,7 @@ |
||
| 90 | 90 | } |
| 91 | 91 | |
| 92 | 92 | $this->logger->info('found first time username ['.$identity->getIdentifier().'], auto-create user', [ |
| 93 | - 'category' => get_class($this), |
|
| 93 | + 'category' => get_class($this), |
|
| 94 | 94 | ]); |
| 95 | 95 | |
| 96 | 96 | $attributes = []; |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | /** |
| 6 | 6 | * balloon |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | */ |
| 87 | 87 | public static function isValidTimestamp(string $timestamp): bool |
| 88 | 88 | { |
| 89 | - return ((string) (int) $timestamp === $timestamp) |
|
| 89 | + return ((string)(int)$timestamp === $timestamp) |
|
| 90 | 90 | && ($timestamp <= PHP_INT_MAX) |
| 91 | 91 | && ($timestamp >= ~PHP_INT_MAX); |
| 92 | 92 | } |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | /** |
| 6 | 6 | * balloon |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | foreach ($config as $option => $value) { |
| 49 | 49 | switch ($option) { |
| 50 | 50 | case 'db': |
| 51 | - $this->db = (string) $value; |
|
| 51 | + $this->db = (string)$value; |
|
| 52 | 52 | |
| 53 | 53 | break; |
| 54 | 54 | default: |
@@ -50,7 +50,7 @@ |
||
| 50 | 50 | $this->db->storage->updateOne( |
| 51 | 51 | ['_id' => $object['_id']], |
| 52 | 52 | [ |
| 53 | - '$set' => ['filter' => $filter], |
|
| 53 | + '$set' => ['filter' => $filter], |
|
| 54 | 54 | ] |
| 55 | 55 | ); |
| 56 | 56 | } |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | /** |
| 6 | 6 | * balloon |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | /** |
| 6 | 6 | * balloon |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | throw new Exception('soffice option must be a path to an executable office suite'); |
| 156 | 156 | } |
| 157 | 157 | |
| 158 | - $this->soffice = (string) $value; |
|
| 158 | + $this->soffice = (string)$value; |
|
| 159 | 159 | |
| 160 | 160 | break; |
| 161 | 161 | case 'tmp': |
@@ -163,7 +163,7 @@ discard block |
||
| 163 | 163 | throw new Exception('tmp option must be a writable directory'); |
| 164 | 164 | } |
| 165 | 165 | |
| 166 | - $this->tmp = (string) $value; |
|
| 166 | + $this->tmp = (string)$value; |
|
| 167 | 167 | |
| 168 | 168 | break; |
| 169 | 169 | case 'timeout': |
@@ -171,11 +171,11 @@ discard block |
||
| 171 | 171 | throw new Exception('timeout option must be a number'); |
| 172 | 172 | } |
| 173 | 173 | |
| 174 | - $this->timeout = (string) $value; |
|
| 174 | + $this->timeout = (string)$value; |
|
| 175 | 175 | |
| 176 | 176 | break; |
| 177 | 177 | case 'preview_max_size': |
| 178 | - $this->preview_max_size = (int) $value; |
|
| 178 | + $this->preview_max_size = (int)$value; |
|
| 179 | 179 | |
| 180 | 180 | break; |
| 181 | 181 | default: |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | /** |
| 6 | 6 | * balloon |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | foreach ($config as $option => $value) { |
| 95 | 95 | switch ($option) { |
| 96 | 96 | case 'preview_max_size': |
| 97 | - $this->preview_max_size = (int) $value; |
|
| 97 | + $this->preview_max_size = (int)$value; |
|
| 98 | 98 | |
| 99 | 99 | break; |
| 100 | 100 | default: |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | */ |
| 111 | 111 | public function match(File $file): bool |
| 112 | 112 | { |
| 113 | - return (bool) preg_match($this->match_convert, $file->getContentType()); |
|
| 113 | + return (bool)preg_match($this->match_convert, $file->getContentType()); |
|
| 114 | 114 | } |
| 115 | 115 | |
| 116 | 116 | /** |