@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | use function in_array; |
| 53 | 53 | |
| 54 | 54 | class Manager implements IManager { |
| 55 | - private const TOKEN_CLEANUP_TIME = 12 * 60 * 60 ; |
|
| 55 | + private const TOKEN_CLEANUP_TIME = 12 * 60 * 60; |
|
| 56 | 56 | |
| 57 | 57 | public const TABLE_TOKENS = 'direct_edit'; |
| 58 | 58 | |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | $templates = $creator->getTemplates(); |
| 118 | 118 | } |
| 119 | 119 | |
| 120 | - $templates = array_map(function ($template) use ($creator) { |
|
| 120 | + $templates = array_map(function($template) use ($creator) { |
|
| 121 | 121 | $template['extension'] = $creator->getExtension(); |
| 122 | 122 | $template['mimetype'] = $creator->getMimetype(); |
| 123 | 123 | return $template; |
@@ -161,7 +161,7 @@ discard block |
||
| 161 | 161 | |
| 162 | 162 | // Workaround to always open files with edit permissions if multiple occurences of |
| 163 | 163 | // the same file id are in the user home, ideally we should also track the path of the file when opening |
| 164 | - usort($files, function (Node $a, Node $b) { |
|
| 164 | + usort($files, function(Node $a, Node $b) { |
|
| 165 | 165 | return ($b->getPermissions() & Constants::PERMISSION_UPDATE) <=> ($a->getPermissions() & Constants::PERMISSION_UPDATE); |
| 166 | 166 | }); |
| 167 | 167 | $file = array_shift($files); |
@@ -291,7 +291,7 @@ discard block |
||
| 291 | 291 | 'file_id' => $query->createNamedParameter($file->getId()), |
| 292 | 292 | 'file_path' => $query->createNamedParameter($filePath), |
| 293 | 293 | 'user_id' => $query->createNamedParameter($this->userId), |
| 294 | - 'share_id' => $query->createNamedParameter($share !== null ? $share->getId(): null), |
|
| 294 | + 'share_id' => $query->createNamedParameter($share !== null ? $share->getId() : null), |
|
| 295 | 295 | 'timestamp' => $query->createNamedParameter(time()) |
| 296 | 296 | ]); |
| 297 | 297 | $query->execute(); |
@@ -312,7 +312,7 @@ discard block |
||
| 312 | 312 | } |
| 313 | 313 | $files = $userFolder->getById($fileId); |
| 314 | 314 | if (count($files) === 0) { |
| 315 | - throw new NotFoundException('File nound found by id ' . $fileId); |
|
| 315 | + throw new NotFoundException('File nound found by id '.$fileId); |
|
| 316 | 316 | } |
| 317 | 317 | return $files[0]; |
| 318 | 318 | } |