@@ -141,14 +141,14 @@ discard block |
||
141 | 141 | ->from(self::TAG_TABLE); |
142 | 142 | |
143 | 143 | if (!\is_null($visibilityFilter)) { |
144 | - $query->andWhere($query->expr()->eq('visibility', $query->createNamedParameter((int)$visibilityFilter))); |
|
144 | + $query->andWhere($query->expr()->eq('visibility', $query->createNamedParameter((int) $visibilityFilter))); |
|
145 | 145 | } |
146 | 146 | |
147 | 147 | if (!empty($nameSearchPattern)) { |
148 | 148 | $query->andWhere( |
149 | 149 | $query->expr()->like( |
150 | 150 | 'name', |
151 | - $query->createNamedParameter('%' . $this->connection->escapeLikeParameter($nameSearchPattern). '%') |
|
151 | + $query->createNamedParameter('%'.$this->connection->escapeLikeParameter($nameSearchPattern).'%') |
|
152 | 152 | ) |
153 | 153 | ); |
154 | 154 | } |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | $result->closeCursor(); |
183 | 183 | if (!$row) { |
184 | 184 | throw new TagNotFoundException( |
185 | - 'Tag ("' . $tagName . '", '. $userVisible . ', ' . $userAssignable . ') does not exist' |
|
185 | + 'Tag ("'.$tagName.'", '.$userVisible.', '.$userAssignable.') does not exist' |
|
186 | 186 | ); |
187 | 187 | } |
188 | 188 | |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | $query->execute(); |
206 | 206 | } catch (UniqueConstraintViolationException $e) { |
207 | 207 | throw new TagAlreadyExistsException( |
208 | - 'Tag ("' . $tagName . '", '. $userVisible . ', ' . $userAssignable . ') already exists', |
|
208 | + 'Tag ("'.$tagName.'", '.$userVisible.', '.$userAssignable.') already exists', |
|
209 | 209 | 0, |
210 | 210 | $e |
211 | 211 | ); |
@@ -214,7 +214,7 @@ discard block |
||
214 | 214 | $tagId = $query->getLastInsertId(); |
215 | 215 | |
216 | 216 | $tag = new SystemTag( |
217 | - (string)$tagId, |
|
217 | + (string) $tagId, |
|
218 | 218 | $tagName, |
219 | 219 | $userVisible, |
220 | 220 | $userAssignable |
@@ -266,7 +266,7 @@ discard block |
||
266 | 266 | } |
267 | 267 | } catch (UniqueConstraintViolationException $e) { |
268 | 268 | throw new TagAlreadyExistsException( |
269 | - 'Tag ("' . $newName . '", '. $userVisible . ', ' . $userAssignable . ') already exists', |
|
269 | + 'Tag ("'.$newName.'", '.$userVisible.', '.$userAssignable.') already exists', |
|
270 | 270 | 0, |
271 | 271 | $e |
272 | 272 | ); |
@@ -373,7 +373,7 @@ discard block |
||
373 | 373 | } |
374 | 374 | |
375 | 375 | private function createSystemTagFromRow($row) { |
376 | - return new SystemTag((string)$row['id'], $row['name'], (bool)$row['visibility'], (bool)$row['editable']); |
|
376 | + return new SystemTag((string) $row['id'], $row['name'], (bool) $row['visibility'], (bool) $row['editable']); |
|
377 | 377 | } |
378 | 378 | |
379 | 379 | /** |
@@ -86,9 +86,9 @@ discard block |
||
86 | 86 | do { |
87 | 87 | $users = $backend->getUsers('', $limit, $offset); |
88 | 88 | foreach ($users as $user) { |
89 | - $output->writeln('Scanning all files for ' . $user); |
|
89 | + $output->writeln('Scanning all files for '.$user); |
|
90 | 90 | $this->setupUserFS($user); |
91 | - $result &= $this->scanFolder($output, '/' . $user); |
|
91 | + $result &= $this->scanFolder($output, '/'.$user); |
|
92 | 92 | } |
93 | 93 | $offset += $limit; |
94 | 94 | } while (count($users) >= $limit); |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | $clean = true; |
107 | 107 | |
108 | 108 | foreach ($this->rootView->getDirectoryContent($folder) as $item) { |
109 | - $path = $folder . '/' . $item['name']; |
|
109 | + $path = $folder.'/'.$item['name']; |
|
110 | 110 | if ($this->rootView->is_dir($path)) { |
111 | 111 | if ($this->scanFolder($output, $path) === false) { |
112 | 112 | $clean = false; |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | $stats = $this->rootView->stat($path); |
121 | 121 | if (!isset($stats['hasHeader']) || $stats['hasHeader'] === false) { |
122 | 122 | $clean = false; |
123 | - $output->writeln($path . ' does not have a proper header'); |
|
123 | + $output->writeln($path.' does not have a proper header'); |
|
124 | 124 | } |
125 | 125 | } |
126 | 126 | } |
@@ -54,7 +54,7 @@ |
||
54 | 54 | parent::__construct(self::APP_ID, $urlParams); |
55 | 55 | |
56 | 56 | $dispatcher = $this->getContainer()->query(IEventDispatcher::class); |
57 | - $dispatcher->addListener(RegisterWidgetEvent::class, function (Event $e) { |
|
57 | + $dispatcher->addListener(RegisterWidgetEvent::class, function(Event $e) { |
|
58 | 58 | Util::addScript(self::APP_ID, 'weather-status'); |
59 | 59 | }); |
60 | 60 | } |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | $offset = (int) $arguments['offset']; |
73 | 73 | $stopAt = (int) $arguments['stopAt']; |
74 | 74 | |
75 | - $this->logger->info('Building calendar index (' . $offset .'/' . $stopAt . ')'); |
|
75 | + $this->logger->info('Building calendar index ('.$offset.'/'.$stopAt.')'); |
|
76 | 76 | |
77 | 77 | $startTime = $this->timeFactory->getTime(); |
78 | 78 | while (($this->timeFactory->getTime() - $startTime) < 15) { |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | 'offset' => $offset, |
90 | 90 | 'stopAt' => $stopAt |
91 | 91 | ]); |
92 | - $this->logger->info('New building calendar index job scheduled with offset ' . $offset); |
|
92 | + $this->logger->info('New building calendar index job scheduled with offset '.$offset); |
|
93 | 93 | } |
94 | 94 | } |
95 | 95 |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | } |
57 | 57 | |
58 | 58 | public function getUnjailedPath($path) { |
59 | - return trim(Filesystem::normalizePath($this->rootPath . '/' . $path), '/'); |
|
59 | + return trim(Filesystem::normalizePath($this->rootPath.'/'.$path), '/'); |
|
60 | 60 | } |
61 | 61 | |
62 | 62 | /** |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | |
69 | 69 | |
70 | 70 | public function getJailedPath($path) { |
71 | - $root = rtrim($this->rootPath, '/') . '/'; |
|
71 | + $root = rtrim($this->rootPath, '/').'/'; |
|
72 | 72 | |
73 | 73 | if ($path !== $this->rootPath && strpos($path, $root) !== 0) { |
74 | 74 | return null; |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | ]); |
89 | 89 | } catch (Exception $e) { |
90 | 90 | $this->logger->logException($e, ['message' => 'Exception when creating a new file through direct editing']); |
91 | - return new DataResponse(['message' => 'Failed to create file: ' . $e->getMessage()], Http::STATUS_FORBIDDEN); |
|
91 | + return new DataResponse(['message' => 'Failed to create file: '.$e->getMessage()], Http::STATUS_FORBIDDEN); |
|
92 | 92 | } |
93 | 93 | } |
94 | 94 | |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | ]); |
109 | 109 | } catch (Exception $e) { |
110 | 110 | $this->logger->logException($e, ['message' => 'Exception when opening a file through direct editing']); |
111 | - return new DataResponse(['message' => 'Failed to open file: ' . $e->getMessage()], Http::STATUS_FORBIDDEN); |
|
111 | + return new DataResponse(['message' => 'Failed to open file: '.$e->getMessage()], Http::STATUS_FORBIDDEN); |
|
112 | 112 | } |
113 | 113 | } |
114 | 114 | |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | return new DataResponse($this->directEditingManager->getTemplates($editorId, $creatorId)); |
128 | 128 | } catch (Exception $e) { |
129 | 129 | $this->logger->logException($e); |
130 | - return new DataResponse(['message' => 'Failed to obtain template list: ' . $e->getMessage()], Http::STATUS_INTERNAL_SERVER_ERROR); |
|
130 | + return new DataResponse(['message' => 'Failed to obtain template list: '.$e->getMessage()], Http::STATUS_INTERNAL_SERVER_ERROR); |
|
131 | 131 | } |
132 | 132 | } |
133 | 133 | } |
@@ -245,10 +245,10 @@ discard block |
||
245 | 245 | $dependencyAnalyzer = new DependencyAnalyzer(new Platform($this->config), $this->l10n); |
246 | 246 | |
247 | 247 | // Extend existing app details |
248 | - $apps = array_map(function ($appData) use ($dependencyAnalyzer) { |
|
248 | + $apps = array_map(function($appData) use ($dependencyAnalyzer) { |
|
249 | 249 | if (isset($appData['appstoreData'])) { |
250 | 250 | $appstoreData = $appData['appstoreData']; |
251 | - $appData['screenshot'] = isset($appstoreData['screenshots'][0]['url']) ? 'https://usercontent.apps.nextcloud.com/' . base64_encode($appstoreData['screenshots'][0]['url']) : ''; |
|
251 | + $appData['screenshot'] = isset($appstoreData['screenshots'][0]['url']) ? 'https://usercontent.apps.nextcloud.com/'.base64_encode($appstoreData['screenshots'][0]['url']) : ''; |
|
252 | 252 | $appData['category'] = $appstoreData['categories']; |
253 | 253 | $appData['releases'] = $appstoreData['releases']; |
254 | 254 | } |
@@ -543,8 +543,8 @@ discard block |
||
543 | 543 | } |
544 | 544 | |
545 | 545 | private function sortApps($a, $b) { |
546 | - $a = (string)$a['name']; |
|
547 | - $b = (string)$b['name']; |
|
546 | + $a = (string) $a['name']; |
|
547 | + $b = (string) $b['name']; |
|
548 | 548 | if ($a === $b) { |
549 | 549 | return 0; |
550 | 550 | } |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | return true; |
73 | 73 | } |
74 | 74 | |
75 | - $size = isset($queryParams['size']) ? (int)$queryParams['size'] : -1; |
|
75 | + $size = isset($queryParams['size']) ? (int) $queryParams['size'] : -1; |
|
76 | 76 | |
77 | 77 | $path = $request->getPath(); |
78 | 78 | $node = $this->server->tree->getNodeForPath($path); |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | try { |
104 | 104 | $file = $this->cache->get($addressbook->getResourceId(), $node->getName(), $size, $node); |
105 | 105 | $response->setHeader('Content-Type', $file->getMimeType()); |
106 | - $fileName = $node->getName() . '.' . PhotoCache::ALLOWED_CONTENT_TYPES[$file->getMimeType()]; |
|
106 | + $fileName = $node->getName().'.'.PhotoCache::ALLOWED_CONTENT_TYPES[$file->getMimeType()]; |
|
107 | 107 | $response->setHeader('Content-Disposition', "attachment; filename=$fileName"); |
108 | 108 | $response->setStatus(200); |
109 | 109 |
@@ -36,7 +36,7 @@ |
||
36 | 36 | * @NoSubAdminRequired |
37 | 37 | */ |
38 | 38 | public function getPdf() { |
39 | - $data = file_get_contents(__DIR__ . '/../../data/Reasons to use Nextcloud.pdf'); |
|
39 | + $data = file_get_contents(__DIR__.'/../../data/Reasons to use Nextcloud.pdf'); |
|
40 | 40 | |
41 | 41 | $resp = new DataDisplayResponse($data); |
42 | 42 | $resp->addHeader('Content-Type', 'application/pdf'); |