@@ -109,11 +109,11 @@ discard block |
||
109 | 109 | |
110 | 110 | try { |
111 | 111 | $comment = $this->commentsManager->get($id); |
112 | - if($comment->getObjectType() !== 'files') { |
|
112 | + if ($comment->getObjectType() !== 'files') { |
|
113 | 113 | return new NotFoundResponse(); |
114 | 114 | } |
115 | 115 | $userFolder = $this->rootFolder->getUserFolder($currentUser->getUID()); |
116 | - $files = $userFolder->getById((int)$comment->getObjectId()); |
|
116 | + $files = $userFolder->getById((int) $comment->getObjectId()); |
|
117 | 117 | |
118 | 118 | $this->markProcessed($comment, $currentUser); |
119 | 119 | |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | |
124 | 124 | $url = $this->urlGenerator->linkToRouteAbsolute( |
125 | 125 | 'files.viewcontroller.showFile', |
126 | - [ 'fileid' => $comment->getObjectId() ] |
|
126 | + ['fileid' => $comment->getObjectId()] |
|
127 | 127 | ); |
128 | 128 | |
129 | 129 | return new RedirectResponse($url); |
@@ -64,10 +64,10 @@ |
||
64 | 64 | public function setupDatabase($username) { |
65 | 65 | $datadir = $this->config->getValue( |
66 | 66 | 'datadirectory', |
67 | - \OC::$SERVERROOT . '/data' |
|
67 | + \OC::$SERVERROOT.'/data' |
|
68 | 68 | ); |
69 | 69 | |
70 | - $sqliteFile = $datadir . '/' . $this->dbName . 'db'; |
|
70 | + $sqliteFile = $datadir.'/'.$this->dbName.'db'; |
|
71 | 71 | if (file_exists($sqliteFile)) { |
72 | 72 | unlink($sqliteFile); |
73 | 73 | } |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | if ($host === '') { |
141 | 141 | $additionalConnectionParams['dbname'] = $dbName; // use dbname as easy connect name |
142 | 142 | } else { |
143 | - $additionalConnectionParams['dbname'] = '//' . $host . (!empty($port) ? ":{$port}" : "") . '/' . $dbName; |
|
143 | + $additionalConnectionParams['dbname'] = '//'.$host.(!empty($port) ? ":{$port}" : "").'/'.$dbName; |
|
144 | 144 | } |
145 | 145 | unset($additionalConnectionParams['host']); |
146 | 146 | break; |
@@ -195,8 +195,8 @@ discard block |
||
195 | 195 | $name = $this->config->getValue('dbname', self::DEFAULT_DBNAME); |
196 | 196 | |
197 | 197 | if ($this->normalizeType($type) === 'sqlite3') { |
198 | - $dataDir = $this->config->getValue("datadirectory", \OC::$SERVERROOT . '/data'); |
|
199 | - $connectionParams['path'] = $dataDir . '/' . $name . '.db'; |
|
198 | + $dataDir = $this->config->getValue("datadirectory", \OC::$SERVERROOT.'/data'); |
|
199 | + $connectionParams['path'] = $dataDir.'/'.$name.'.db'; |
|
200 | 200 | } else { |
201 | 201 | $host = $this->config->getValue('dbhost', ''); |
202 | 202 | $connectionParams = array_merge($connectionParams, $this->splitHostFromPortAndSocket($host)); |
@@ -42,7 +42,7 @@ |
||
42 | 42 | $schema = $schemaClosure(); |
43 | 43 | |
44 | 44 | $table = $schema->getTable('authtoken'); |
45 | - $table->addColumn('password_invalid','boolean', [ |
|
45 | + $table->addColumn('password_invalid', 'boolean', [ |
|
46 | 46 | 'notnull' => true, |
47 | 47 | 'default' => false, |
48 | 48 | ]); |
@@ -50,7 +50,7 @@ |
||
50 | 50 | <?php endif ?> |
51 | 51 | <?php if (!is_null($_['backupProvider'])): ?> |
52 | 52 | <p> |
53 | - <a class="<?php if($noProviders): ?>button primary two-factor-primary<?php else: ?>two-factor-secondary<?php endif ?>" href="<?php p(\OC::$server->getURLGenerator()->linkToRoute('core.TwoFactorChallenge.showChallenge', |
|
53 | + <a class="<?php if ($noProviders): ?>button primary two-factor-primary<?php else: ?>two-factor-secondary<?php endif ?>" href="<?php p(\OC::$server->getURLGenerator()->linkToRoute('core.TwoFactorChallenge.showChallenge', |
|
54 | 54 | [ |
55 | 55 | 'challengeProviderId' => $_['backupProvider']->getId(), |
56 | 56 | 'redirect_url' => $_['redirect_url'], |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | $cacheBusterCounter = $this->config->getAppValue('theming', 'cachebuster', '0'); |
76 | 76 | try { |
77 | 77 | $image = $this->getImage($key, $useSvg); |
78 | - return $this->urlGenerator->linkToRoute('theming.Theming.getImage', [ 'key' => $key ]) . '?v=' . $cacheBusterCounter; |
|
78 | + return $this->urlGenerator->linkToRoute('theming.Theming.getImage', ['key' => $key]).'?v='.$cacheBusterCounter; |
|
79 | 79 | } catch (NotFoundException $e) { |
80 | 80 | } |
81 | 81 | |
@@ -83,9 +83,9 @@ discard block |
||
83 | 83 | case 'logo': |
84 | 84 | case 'logoheader': |
85 | 85 | case 'favicon': |
86 | - return $this->urlGenerator->imagePath('core', 'logo/logo.png') . '?v=' . $cacheBusterCounter; |
|
86 | + return $this->urlGenerator->imagePath('core', 'logo/logo.png').'?v='.$cacheBusterCounter; |
|
87 | 87 | case 'background': |
88 | - return $this->urlGenerator->imagePath('core', 'background.png') . '?v=' . $cacheBusterCounter; |
|
88 | + return $this->urlGenerator->imagePath('core', 'background.png').'?v='.$cacheBusterCounter; |
|
89 | 89 | } |
90 | 90 | } |
91 | 91 | |
@@ -102,26 +102,26 @@ discard block |
||
102 | 102 | */ |
103 | 103 | public function getImage(string $key, bool $useSvg = true): ISimpleFile { |
104 | 104 | $pngFile = null; |
105 | - $logo = $this->config->getAppValue('theming', $key . 'Mime', false); |
|
105 | + $logo = $this->config->getAppValue('theming', $key.'Mime', false); |
|
106 | 106 | $folder = $this->appData->getFolder('images'); |
107 | 107 | if ($logo === false || !$folder->fileExists($key)) { |
108 | 108 | throw new NotFoundException(); |
109 | 109 | } |
110 | 110 | if (!$useSvg && $this->shouldReplaceIcons()) { |
111 | - if (!$folder->fileExists($key . '.png')) { |
|
111 | + if (!$folder->fileExists($key.'.png')) { |
|
112 | 112 | try { |
113 | 113 | $finalIconFile = new \Imagick(); |
114 | 114 | $finalIconFile->setBackgroundColor('none'); |
115 | 115 | $finalIconFile->readImageBlob($folder->getFile($key)->getContent()); |
116 | 116 | $finalIconFile->setImageFormat('png32'); |
117 | - $pngFile = $folder->newFile($key . '.png'); |
|
117 | + $pngFile = $folder->newFile($key.'.png'); |
|
118 | 118 | $pngFile->putContent($finalIconFile->getImageBlob()); |
119 | 119 | } catch (\ImagickException $e) { |
120 | - $this->logger->info('The image was requested to be no SVG file, but converting it to PNG failed: ' . $e->getMessage()); |
|
120 | + $this->logger->info('The image was requested to be no SVG file, but converting it to PNG failed: '.$e->getMessage()); |
|
121 | 121 | $pngFile = null; |
122 | 122 | } |
123 | 123 | } else { |
124 | - $pngFile = $folder->getFile($key . '.png'); |
|
124 | + $pngFile = $folder->getFile($key.'.png'); |
|
125 | 125 | } |
126 | 126 | } |
127 | 127 | if ($pngFile !== null) { |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | $images = []; |
135 | 135 | foreach ($this->supportedImageKeys as $key) { |
136 | 136 | $images[$key] = [ |
137 | - 'mime' => $this->config->getAppValue('theming', $key . 'Mime', ''), |
|
137 | + 'mime' => $this->config->getAppValue('theming', $key.'Mime', ''), |
|
138 | 138 | 'url' => $this->getImageUrl($key), |
139 | 139 | ]; |
140 | 140 | } |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | } catch (NotPermittedException $e) { |
201 | 201 | } |
202 | 202 | try { |
203 | - $file = $this->appData->getFolder('images')->getFile($key . '.png'); |
|
203 | + $file = $this->appData->getFolder('images')->getFile($key.'.png'); |
|
204 | 204 | $file->delete(); |
205 | 205 | } catch (NotFoundException $e) { |
206 | 206 | } catch (NotPermittedException $e) { |
@@ -230,12 +230,12 @@ discard block |
||
230 | 230 | * @return bool |
231 | 231 | */ |
232 | 232 | public function shouldReplaceIcons() { |
233 | - $cache = $this->cacheFactory->createDistributed('theming-' . $this->urlGenerator->getBaseUrl()); |
|
234 | - if($value = $cache->get('shouldReplaceIcons')) { |
|
235 | - return (bool)$value; |
|
233 | + $cache = $this->cacheFactory->createDistributed('theming-'.$this->urlGenerator->getBaseUrl()); |
|
234 | + if ($value = $cache->get('shouldReplaceIcons')) { |
|
235 | + return (bool) $value; |
|
236 | 236 | } |
237 | 237 | $value = false; |
238 | - if(extension_loaded('imagick')) { |
|
238 | + if (extension_loaded('imagick')) { |
|
239 | 239 | if (count(\Imagick::queryFormats('SVG')) >= 1) { |
240 | 240 | $value = true; |
241 | 241 | } |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | * @since 14.0.0 |
75 | 75 | */ |
76 | 76 | public function getBackends():array { |
77 | - foreach($this->backends as $backend) { |
|
77 | + foreach ($this->backends as $backend) { |
|
78 | 78 | if (isset($this->initializedBackends[$backend])) { |
79 | 79 | continue; |
80 | 80 | } |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | */ |
93 | 93 | public function getBackend($backendId) { |
94 | 94 | $backends = $this->getBackends(); |
95 | - foreach($backends as $backend) { |
|
95 | + foreach ($backends as $backend) { |
|
96 | 96 | if ($backend->getBackendIdentifier() === $backendId) { |
97 | 97 | return $backend; |
98 | 98 | } |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | * @since 14.0.0 |
75 | 75 | */ |
76 | 76 | public function getBackends():array { |
77 | - foreach($this->backends as $backend) { |
|
77 | + foreach ($this->backends as $backend) { |
|
78 | 78 | if (isset($this->initializedBackends[$backend])) { |
79 | 79 | continue; |
80 | 80 | } |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | */ |
93 | 93 | public function getBackend($backendId) { |
94 | 94 | $backends = $this->getBackends(); |
95 | - foreach($backends as $backend) { |
|
95 | + foreach ($backends as $backend) { |
|
96 | 96 | if ($backend->getBackendIdentifier() === $backendId) { |
97 | 97 | return $backend; |
98 | 98 | } |
@@ -42,7 +42,7 @@ |
||
42 | 42 | */ |
43 | 43 | public function __construct($newProviderId, $existingProviderName) { |
44 | 44 | $l = \OC::$server->getL10N('federation'); |
45 | - $message = 'ID "' . $newProviderId . '" already used by cloud federation provider "' . $existingProviderName . '"'; |
|
45 | + $message = 'ID "'.$newProviderId.'" already used by cloud federation provider "'.$existingProviderName.'"'; |
|
46 | 46 | $hint = $l->t('ID "%1$s" already used by cloud federation provider "%2$s"', [$newProviderId, $existingProviderName]); |
47 | 47 | parent::__construct($message, $hint); |
48 | 48 | } |