@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | use function in_array; |
52 | 52 | |
53 | 53 | class Manager implements IManager { |
54 | - private const TOKEN_CLEANUP_TIME = 12 * 60 * 60 ; |
|
54 | + private const TOKEN_CLEANUP_TIME = 12 * 60 * 60; |
|
55 | 55 | |
56 | 56 | public const TABLE_TOKENS = 'direct_edit'; |
57 | 57 | |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | $templates = $creator->getTemplates(); |
114 | 114 | } |
115 | 115 | |
116 | - $templates = array_map(function ($template) use ($creator) { |
|
116 | + $templates = array_map(function($template) use ($creator) { |
|
117 | 117 | $template['extension'] = $creator->getExtension(); |
118 | 118 | $template['mimetype'] = $creator->getMimetype(); |
119 | 119 | return $template; |
@@ -255,7 +255,7 @@ discard block |
||
255 | 255 | 'file_id' => $query->createNamedParameter($file->getId()), |
256 | 256 | 'file_path' => $query->createNamedParameter($filePath), |
257 | 257 | 'user_id' => $query->createNamedParameter($this->userId), |
258 | - 'share_id' => $query->createNamedParameter($share !== null ? $share->getId(): null), |
|
258 | + 'share_id' => $query->createNamedParameter($share !== null ? $share->getId() : null), |
|
259 | 259 | 'timestamp' => $query->createNamedParameter(time()) |
260 | 260 | ]); |
261 | 261 | $query->execute(); |
@@ -276,7 +276,7 @@ discard block |
||
276 | 276 | } |
277 | 277 | $files = $userFolder->getById($fileId); |
278 | 278 | if (count($files) === 0) { |
279 | - throw new NotFoundException('File nound found by id ' . $fileId); |
|
279 | + throw new NotFoundException('File nound found by id '.$fileId); |
|
280 | 280 | } |
281 | 281 | return $files[0]; |
282 | 282 | } |
@@ -95,7 +95,7 @@ |
||
95 | 95 | foreach ($policies as $policy) { |
96 | 96 | header( |
97 | 97 | sprintf( |
98 | - 'Set-Cookie: %snc_sameSiteCookie%s=true; path=%s; httponly;' . $secureCookie . 'expires=Fri, 31-Dec-2100 23:59:59 GMT; SameSite=%s', |
|
98 | + 'Set-Cookie: %snc_sameSiteCookie%s=true; path=%s; httponly;'.$secureCookie.'expires=Fri, 31-Dec-2100 23:59:59 GMT; SameSite=%s', |
|
99 | 99 | $cookiePrefix, |
100 | 100 | $policy, |
101 | 101 | $cookieParams['path'], |
@@ -125,7 +125,7 @@ |
||
125 | 125 | $status = self::STATUS_FOUND; |
126 | 126 | } |
127 | 127 | |
128 | - return $this->protocolVersion . ' ' . $status . ' ' . |
|
128 | + return $this->protocolVersion.' '.$status.' '. |
|
129 | 129 | $this->headers[$status]; |
130 | 130 | } |
131 | 131 | } |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | $result = ['wide' => [], 'exact' => []]; |
64 | 64 | |
65 | 65 | $groups = $this->groupManager->search($search, $limit, $offset); |
66 | - $groupIds = array_map(function (IGroup $group) { |
|
66 | + $groupIds = array_map(function(IGroup $group) { |
|
67 | 67 | return $group->getGID(); |
68 | 68 | }, $groups); |
69 | 69 | |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | if (!empty($groups) && ($this->shareWithGroupOnly || $this->shareeEnumerationInGroupOnly)) { |
76 | 76 | // Intersect all the groups that match with the groups this user is a member of |
77 | 77 | $userGroups = $this->groupManager->getUserGroups($this->userSession->getUser()); |
78 | - $userGroups = array_map(function (IGroup $group) { |
|
78 | + $userGroups = array_map(function(IGroup $group) { |
|
79 | 79 | return $group->getGID(); |
80 | 80 | }, $userGroups); |
81 | 81 | $groupIds = array_intersect($groupIds, $userGroups); |
@@ -86,7 +86,7 @@ |
||
86 | 86 | $response = new Response(); |
87 | 87 | $response->addHeader('Access-Control-Allow-Origin', $origin); |
88 | 88 | $response->addHeader('Access-Control-Allow-Methods', $this->corsMethods); |
89 | - $response->addHeader('Access-Control-Max-Age', (string)$this->corsMaxAge); |
|
89 | + $response->addHeader('Access-Control-Max-Age', (string) $this->corsMaxAge); |
|
90 | 90 | $response->addHeader('Access-Control-Allow-Headers', $this->corsAllowedHeaders); |
91 | 91 | $response->addHeader('Access-Control-Allow-Credentials', 'false'); |
92 | 92 | return $response; |
@@ -67,11 +67,11 @@ |
||
67 | 67 | /** |
68 | 68 | * @deprecated 20.0.0 use OCP\AppFramework\Http\Events\BeforeTemplateRenderedEvent |
69 | 69 | */ |
70 | - public const EVENT_LOAD_ADDITIONAL_SCRIPTS = self::class . '::loadAdditionalScripts'; |
|
70 | + public const EVENT_LOAD_ADDITIONAL_SCRIPTS = self::class.'::loadAdditionalScripts'; |
|
71 | 71 | /** |
72 | 72 | * @deprecated 20.0.0 use OCP\AppFramework\Http\Events\BeforeTemplateRenderedEvent |
73 | 73 | */ |
74 | - public const EVENT_LOAD_ADDITIONAL_SCRIPTS_LOGGEDIN = self::class . '::loadAdditionalScriptsLoggedIn'; |
|
74 | + public const EVENT_LOAD_ADDITIONAL_SCRIPTS_LOGGEDIN = self::class.'::loadAdditionalScriptsLoggedIn'; |
|
75 | 75 | |
76 | 76 | /** |
77 | 77 | * name of the template |
@@ -67,10 +67,10 @@ |
||
67 | 67 | $corsMaxAge = 1728000) { |
68 | 68 | parent::__construct($appName, $request, $corsMethods, |
69 | 69 | $corsAllowedHeaders, $corsMaxAge); |
70 | - $this->registerResponder('json', function ($data) { |
|
70 | + $this->registerResponder('json', function($data) { |
|
71 | 71 | return $this->buildOCSResponse('json', $data); |
72 | 72 | }); |
73 | - $this->registerResponder('xml', function ($data) { |
|
73 | + $this->registerResponder('xml', function($data) { |
|
74 | 74 | return $this->buildOCSResponse('xml', $data); |
75 | 75 | }); |
76 | 76 | } |
@@ -82,7 +82,7 @@ |
||
82 | 82 | |
83 | 83 | if ($runIsSetupDirectly) { |
84 | 84 | $applicationClassName = get_class($this); |
85 | - $e = new \RuntimeException('App class ' . $applicationClassName . ' is not setup via query() but directly'); |
|
85 | + $e = new \RuntimeException('App class '.$applicationClassName.' is not setup via query() but directly'); |
|
86 | 86 | $setUpViaQuery = false; |
87 | 87 | |
88 | 88 | $classNameParts = explode('\\', trim($applicationClassName, '\\')); |
@@ -64,7 +64,7 @@ |
||
64 | 64 | $this->manager->invalidateTokenById($uid, $token->getId()); |
65 | 65 | } |
66 | 66 | } catch (Throwable $e) { |
67 | - $this->logger->error('Could not clean up auth tokens after user deletion: ' . $e->getMessage(), [ |
|
67 | + $this->logger->error('Could not clean up auth tokens after user deletion: '.$e->getMessage(), [ |
|
68 | 68 | 'exception' => $e, |
69 | 69 | ]); |
70 | 70 | } |