@@ -424,8 +424,8 @@ |
||
| 424 | 424 | ]; |
| 425 | 425 | |
| 426 | 426 | $node->getFilesystem()->getDatabase()->delta->updateMany([ |
| 427 | - 'node' => [ |
|
| 428 | - '$in' => $toset, |
|
| 427 | + 'node' => [ |
|
| 428 | + '$in' => $toset, |
|
| 429 | 429 | ], |
| 430 | 430 | ], $action); |
| 431 | 431 | |
@@ -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 |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | public function preCopyFile( |
| 117 | 117 | File $node, |
| 118 | 118 | Collection $parent, |
| 119 | - int $conflict, |
|
| 119 | + int $conflict, |
|
| 120 | 120 | ?string $recursion, |
| 121 | 121 | bool $recursion_first |
| 122 | 122 | ): void { |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | File $node, |
| 130 | 130 | Collection $parent, |
| 131 | 131 | File $new_node, |
| 132 | - int $conflict, |
|
| 132 | + int $conflict, |
|
| 133 | 133 | ?string $recursion, |
| 134 | 134 | bool $recursion_first |
| 135 | 135 | ): void { |
@@ -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 |
@@ -206,7 +206,7 @@ discard block |
||
| 206 | 206 | public function preCopyFile( |
| 207 | 207 | File $node, |
| 208 | 208 | Collection $parent, |
| 209 | - int $conflict, |
|
| 209 | + int $conflict, |
|
| 210 | 210 | ?string $recursion, |
| 211 | 211 | bool $recursion_first |
| 212 | 212 | ): void; |
@@ -227,7 +227,7 @@ discard block |
||
| 227 | 227 | File $node, |
| 228 | 228 | Collection $parent, |
| 229 | 229 | File $new_node, |
| 230 | - int $conflict, |
|
| 230 | + int $conflict, |
|
| 231 | 231 | ?string $recursion, |
| 232 | 232 | bool $recursion_first |
| 233 | 233 | ): void; |
@@ -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 |
@@ -85,6 +85,6 @@ |
||
| 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 | } |
@@ -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 |
@@ -589,7 +589,7 @@ |
||
| 589 | 589 | ]); |
| 590 | 590 | |
| 591 | 591 | $this->addVersion($attributes) |
| 592 | - ->postPutFile($file, $new, $attributes); |
|
| 592 | + ->postPutFile($file, $new, $attributes); |
|
| 593 | 593 | |
| 594 | 594 | return $this->version; |
| 595 | 595 | } |
@@ -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 |
@@ -44,14 +44,14 @@ discard block |
||
| 44 | 44 | * @param array |
| 45 | 45 | **/ |
| 46 | 46 | protected $temp_files = [ |
| 47 | - '/^\._(.*)$/', // OS/X resource forks |
|
| 48 | - '/^.DS_Store$/', // OS/X custom folder settings |
|
| 47 | + '/^\._(.*)$/', // OS/X resource forks |
|
| 48 | + '/^.DS_Store$/', // OS/X custom folder settings |
|
| 49 | 49 | '/^desktop.ini$/', // Windows custom folder settings |
| 50 | - '/^Thumbs.db$/', // Windows thumbnail cache |
|
| 51 | - '/^.(.*).swpx$/', // ViM temporary files |
|
| 52 | - '/^.(.*).swx$/', // ViM temporary files |
|
| 53 | - '/^.(.*).swp$/', // ViM temporary files |
|
| 54 | - '/^\.dat(.*)$/', // Smultron seems to create these |
|
| 50 | + '/^Thumbs.db$/', // Windows thumbnail cache |
|
| 51 | + '/^.(.*).swpx$/', // ViM temporary files |
|
| 52 | + '/^.(.*).swx$/', // ViM temporary files |
|
| 53 | + '/^.(.*).swp$/', // ViM temporary files |
|
| 54 | + '/^\.dat(.*)$/', // Smultron seems to create these |
|
| 55 | 55 | '/^~lock.(.*)#$/', // Windows 7 lockfiles |
| 56 | 56 | ]; |
| 57 | 57 | |
@@ -543,7 +543,7 @@ discard block |
||
| 543 | 543 | } |
| 544 | 544 | |
| 545 | 545 | $this->hash = $new_hash; |
| 546 | - $max = (int) (string) $this->_fs->getServer()->getMaxFileVersion(); |
|
| 546 | + $max = (int)(string)$this->_fs->getServer()->getMaxFileVersion(); |
|
| 547 | 547 | if (count($this->history) >= $max) { |
| 548 | 548 | $del = key($this->history); |
| 549 | 549 | $this->_logger->debug('history limit ['.$max.'] reached, remove oldest version ['.$del.'] from file ['.$this->_id.']', [ |
@@ -637,8 +637,8 @@ discard block |
||
| 637 | 637 | { |
| 638 | 638 | assert(16 === strlen($data)); |
| 639 | 639 | |
| 640 | - $data[6] = chr(ord($data[6]) & 0x0f | 0x40); // set version to 0100 |
|
| 641 | - $data[8] = chr(ord($data[8]) & 0x3f | 0x80); // set bits 6-7 to 10 |
|
| 640 | + $data[6] = chr(ord($data[6])&0x0f|0x40); // set version to 0100 |
|
| 641 | + $data[8] = chr(ord($data[8])&0x3f|0x80); // set bits 6-7 to 10 |
|
| 642 | 642 | |
| 643 | 643 | return vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex($data), 4)); |
| 644 | 644 | } |
@@ -741,11 +741,11 @@ discard block |
||
| 741 | 741 | |
| 742 | 742 | $tmp_file = $tmp.DIRECTORY_SEPARATOR.$this->guidv4(openssl_random_pseudo_bytes(16)); |
| 743 | 743 | $stream = fopen($tmp_file, 'w+'); |
| 744 | - $size = stream_copy_to_stream($file, $stream, ((int) $this->_fs->getServer()->getMaxFileSize() + 1)); |
|
| 744 | + $size = stream_copy_to_stream($file, $stream, ((int)$this->_fs->getServer()->getMaxFileSize() + 1)); |
|
| 745 | 745 | rewind($stream); |
| 746 | 746 | fclose($file); |
| 747 | 747 | |
| 748 | - if ($size > (int) $this->_fs->getServer()->getMaxFileSize()) { |
|
| 748 | + if ($size > (int)$this->_fs->getServer()->getMaxFileSize()) { |
|
| 749 | 749 | unlink($tmp_file); |
| 750 | 750 | |
| 751 | 751 | throw new Exception\InsufficientStorage( |
@@ -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 |
@@ -140,8 +140,8 @@ discard block |
||
| 140 | 140 | 'BaseFileName' => $attrs['name'], |
| 141 | 141 | 'Size' => $doc->getSize(), |
| 142 | 142 | 'Version' => $attrs['version'], |
| 143 | - 'OwnerId' => (string) $doc->getNode()->getOwner(), |
|
| 144 | - 'UserId' => (string) $this->user->getId(), |
|
| 143 | + 'OwnerId' => (string)$doc->getNode()->getOwner(), |
|
| 144 | + 'UserId' => (string)$this->user->getId(), |
|
| 145 | 145 | 'UserFriendlyName' => $this->user->getUsername(), |
| 146 | 146 | 'UserCanWrite' => true, |
| 147 | 147 | 'PostMessageOrigin' => null, |
@@ -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 |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | foreach ($config as $key => $value) { |
| 69 | 69 | switch ($key) { |
| 70 | 70 | case 'index_configuration': |
| 71 | - $this->{$key} = (string) $value; |
|
| 71 | + $this->{$key} = (string)$value; |
|
| 72 | 72 | |
| 73 | 73 | break; |
| 74 | 74 | 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 |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | { |
| 78 | 78 | $role_decorator = $this->role_decorator; |
| 79 | 79 | |
| 80 | - $string = preg_replace_callback('/(\{user\.(([a-z]\.*)+)\})/', function ($match) use ($user, $role_decorator) { |
|
| 80 | + $string = preg_replace_callback('/(\{user\.(([a-z]\.*)+)\})/', function($match) use ($user, $role_decorator) { |
|
| 81 | 81 | return $role_decorator->decorate($user, [$match[2]])[$match[2]]; |
| 82 | 82 | }, $this->{$type}); |
| 83 | 83 | |
@@ -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 |
@@ -85,16 +85,16 @@ discard block |
||
| 85 | 85 | foreach ($this->server->getGroups($groups_filter) as $role) { |
| 86 | 86 | $body[] = [ |
| 87 | 87 | 'type' => 'group', |
| 88 | - 'id' => (string) $role->getId(), |
|
| 89 | - 'name' => (string) $role->getName(), |
|
| 88 | + 'id' => (string)$role->getId(), |
|
| 89 | + 'name' => (string)$role->getName(), |
|
| 90 | 90 | ]; |
| 91 | 91 | } |
| 92 | 92 | |
| 93 | 93 | foreach ($this->server->getUsers($users_filter) as $role) { |
| 94 | 94 | $body[] = [ |
| 95 | 95 | 'type' => 'user', |
| 96 | - 'id' => (string) $role->getId(), |
|
| 97 | - 'name' => (string) $role->getUsername(), |
|
| 96 | + 'id' => (string)$role->getId(), |
|
| 97 | + 'name' => (string)$role->getUsername(), |
|
| 98 | 98 | ]; |
| 99 | 99 | } |
| 100 | 100 | |