@@ -95,7 +95,7 @@ |
||
95 | 95 | |
96 | 96 | $current = $path; |
97 | 97 | while (true) { |
98 | - $mountPoint = $current . '/'; |
|
98 | + $mountPoint = $current.'/'; |
|
99 | 99 | if (isset($this->mounts[$mountPoint])) { |
100 | 100 | $this->pathCache[$path] = $this->mounts[$mountPoint]; |
101 | 101 | return $this->mounts[$mountPoint]; |
@@ -88,11 +88,11 @@ discard block |
||
88 | 88 | |
89 | 89 | public function registerMounts(IUser $user, array $mounts) { |
90 | 90 | // filter out non-proper storages coming from unit tests |
91 | - $mounts = array_filter($mounts, function (IMountPoint $mount) { |
|
91 | + $mounts = array_filter($mounts, function(IMountPoint $mount) { |
|
92 | 92 | return $mount instanceof SharedMount || $mount->getStorage() && $mount->getStorage()->getCache(); |
93 | 93 | }); |
94 | 94 | /** @var ICachedMountInfo[] $newMounts */ |
95 | - $newMounts = array_map(function (IMountPoint $mount) use ($user) { |
|
95 | + $newMounts = array_map(function(IMountPoint $mount) use ($user) { |
|
96 | 96 | // filter out any storages which aren't scanned yet since we aren't interested in files from those storages (yet) |
97 | 97 | if ($mount->getStorageRootId() === -1) { |
98 | 98 | return null; |
@@ -101,13 +101,13 @@ discard block |
||
101 | 101 | } |
102 | 102 | }, $mounts); |
103 | 103 | $newMounts = array_values(array_filter($newMounts)); |
104 | - $newMountRootIds = array_map(function (ICachedMountInfo $mount) { |
|
104 | + $newMountRootIds = array_map(function(ICachedMountInfo $mount) { |
|
105 | 105 | return $mount->getRootId(); |
106 | 106 | }, $newMounts); |
107 | 107 | $newMounts = array_combine($newMountRootIds, $newMounts); |
108 | 108 | |
109 | 109 | $cachedMounts = $this->getMountsForUser($user); |
110 | - $cachedMountRootIds = array_map(function (ICachedMountInfo $mount) { |
|
110 | + $cachedMountRootIds = array_map(function(ICachedMountInfo $mount) { |
|
111 | 111 | return $mount->getRootId(); |
112 | 112 | }, $cachedMounts); |
113 | 113 | $cachedMounts = array_combine($cachedMountRootIds, $cachedMounts); |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | ], ['root_id', 'user_id']); |
182 | 182 | } else { |
183 | 183 | // in some cases this is legitimate, like orphaned shares |
184 | - $this->logger->debug('Could not get storage info for mount at ' . $mount->getMountPoint()); |
|
184 | + $this->logger->debug('Could not get storage info for mount at '.$mount->getMountPoint()); |
|
185 | 185 | } |
186 | 186 | } |
187 | 187 | |
@@ -214,9 +214,9 @@ discard block |
||
214 | 214 | } |
215 | 215 | $mount_id = $row['mount_id']; |
216 | 216 | if (!is_null($mount_id)) { |
217 | - $mount_id = (int)$mount_id; |
|
217 | + $mount_id = (int) $mount_id; |
|
218 | 218 | } |
219 | - return new CachedMountInfo($user, (int)$row['storage_id'], (int)$row['root_id'], $row['mount_point'], $mount_id, isset($row['path']) ? $row['path'] : ''); |
|
219 | + return new CachedMountInfo($user, (int) $row['storage_id'], (int) $row['root_id'], $row['mount_point'], $mount_id, isset($row['path']) ? $row['path'] : ''); |
|
220 | 220 | } |
221 | 221 | |
222 | 222 | /** |
@@ -290,12 +290,12 @@ discard block |
||
290 | 290 | $row = $query->execute()->fetch(); |
291 | 291 | if (is_array($row)) { |
292 | 292 | $this->cacheInfoCache[$fileId] = [ |
293 | - (int)$row['storage'], |
|
293 | + (int) $row['storage'], |
|
294 | 294 | $row['path'], |
295 | - (int)$row['mimetype'] |
|
295 | + (int) $row['mimetype'] |
|
296 | 296 | ]; |
297 | 297 | } else { |
298 | - throw new NotFoundException('File with id "' . $fileId . '" not found'); |
|
298 | + throw new NotFoundException('File with id "'.$fileId.'" not found'); |
|
299 | 299 | } |
300 | 300 | } |
301 | 301 | return $this->cacheInfoCache[$fileId]; |
@@ -316,16 +316,16 @@ discard block |
||
316 | 316 | $mountsForStorage = $this->getMountsForStorageId($storageId, $user); |
317 | 317 | |
318 | 318 | // filter mounts that are from the same storage but a different directory |
319 | - $filteredMounts = array_filter($mountsForStorage, function (ICachedMountInfo $mount) use ($internalPath, $fileId) { |
|
319 | + $filteredMounts = array_filter($mountsForStorage, function(ICachedMountInfo $mount) use ($internalPath, $fileId) { |
|
320 | 320 | if ($fileId === $mount->getRootId()) { |
321 | 321 | return true; |
322 | 322 | } |
323 | 323 | $internalMountPath = $mount->getRootInternalPath(); |
324 | 324 | |
325 | - return $internalMountPath === '' || substr($internalPath, 0, strlen($internalMountPath) + 1) === $internalMountPath . '/'; |
|
325 | + return $internalMountPath === '' || substr($internalPath, 0, strlen($internalMountPath) + 1) === $internalMountPath.'/'; |
|
326 | 326 | }); |
327 | 327 | |
328 | - return array_map(function (ICachedMountInfo $mount) use ($internalPath) { |
|
328 | + return array_map(function(ICachedMountInfo $mount) use ($internalPath) { |
|
329 | 329 | return new CachedMountFileInfo( |
330 | 330 | $mount->getUser(), |
331 | 331 | $mount->getStorageId(), |
@@ -383,7 +383,7 @@ discard block |
||
383 | 383 | $slash |
384 | 384 | ); |
385 | 385 | |
386 | - $userIds = array_map(function (IUser $user) { |
|
386 | + $userIds = array_map(function(IUser $user) { |
|
387 | 387 | return $user->getUID(); |
388 | 388 | }, $users); |
389 | 389 |
@@ -6,35 +6,35 @@ |
||
6 | 6 | |
7 | 7 | class ComposerStaticInitUpdateNotification |
8 | 8 | { |
9 | - public static $prefixLengthsPsr4 = array ( |
|
9 | + public static $prefixLengthsPsr4 = array( |
|
10 | 10 | 'O' => |
11 | - array ( |
|
11 | + array( |
|
12 | 12 | 'OCA\\UpdateNotification\\' => 23, |
13 | 13 | ), |
14 | 14 | ); |
15 | 15 | |
16 | - public static $prefixDirsPsr4 = array ( |
|
16 | + public static $prefixDirsPsr4 = array( |
|
17 | 17 | 'OCA\\UpdateNotification\\' => |
18 | - array ( |
|
19 | - 0 => __DIR__ . '/..' . '/../lib', |
|
18 | + array( |
|
19 | + 0 => __DIR__.'/..'.'/../lib', |
|
20 | 20 | ), |
21 | 21 | ); |
22 | 22 | |
23 | - public static $classMap = array ( |
|
24 | - 'OCA\\UpdateNotification\\AppInfo\\Application' => __DIR__ . '/..' . '/../lib/AppInfo/Application.php', |
|
25 | - 'OCA\\UpdateNotification\\Command\\Check' => __DIR__ . '/..' . '/../lib/Command/Check.php', |
|
26 | - 'OCA\\UpdateNotification\\Controller\\APIController' => __DIR__ . '/..' . '/../lib/Controller/APIController.php', |
|
27 | - 'OCA\\UpdateNotification\\Controller\\AdminController' => __DIR__ . '/..' . '/../lib/Controller/AdminController.php', |
|
28 | - 'OCA\\UpdateNotification\\Notification\\BackgroundJob' => __DIR__ . '/..' . '/../lib/Notification/BackgroundJob.php', |
|
29 | - 'OCA\\UpdateNotification\\Notification\\Notifier' => __DIR__ . '/..' . '/../lib/Notification/Notifier.php', |
|
30 | - 'OCA\\UpdateNotification\\ResetTokenBackgroundJob' => __DIR__ . '/..' . '/../lib/ResetTokenBackgroundJob.php', |
|
31 | - 'OCA\\UpdateNotification\\Settings\\Admin' => __DIR__ . '/..' . '/../lib/Settings/Admin.php', |
|
32 | - 'OCA\\UpdateNotification\\UpdateChecker' => __DIR__ . '/..' . '/../lib/UpdateChecker.php', |
|
23 | + public static $classMap = array( |
|
24 | + 'OCA\\UpdateNotification\\AppInfo\\Application' => __DIR__.'/..'.'/../lib/AppInfo/Application.php', |
|
25 | + 'OCA\\UpdateNotification\\Command\\Check' => __DIR__.'/..'.'/../lib/Command/Check.php', |
|
26 | + 'OCA\\UpdateNotification\\Controller\\APIController' => __DIR__.'/..'.'/../lib/Controller/APIController.php', |
|
27 | + 'OCA\\UpdateNotification\\Controller\\AdminController' => __DIR__.'/..'.'/../lib/Controller/AdminController.php', |
|
28 | + 'OCA\\UpdateNotification\\Notification\\BackgroundJob' => __DIR__.'/..'.'/../lib/Notification/BackgroundJob.php', |
|
29 | + 'OCA\\UpdateNotification\\Notification\\Notifier' => __DIR__.'/..'.'/../lib/Notification/Notifier.php', |
|
30 | + 'OCA\\UpdateNotification\\ResetTokenBackgroundJob' => __DIR__.'/..'.'/../lib/ResetTokenBackgroundJob.php', |
|
31 | + 'OCA\\UpdateNotification\\Settings\\Admin' => __DIR__.'/..'.'/../lib/Settings/Admin.php', |
|
32 | + 'OCA\\UpdateNotification\\UpdateChecker' => __DIR__.'/..'.'/../lib/UpdateChecker.php', |
|
33 | 33 | ); |
34 | 34 | |
35 | 35 | public static function getInitializer(ClassLoader $loader) |
36 | 36 | { |
37 | - return \Closure::bind(function () use ($loader) { |
|
37 | + return \Closure::bind(function() use ($loader) { |
|
38 | 38 | $loader->prefixLengthsPsr4 = ComposerStaticInitUpdateNotification::$prefixLengthsPsr4; |
39 | 39 | $loader->prefixDirsPsr4 = ComposerStaticInitUpdateNotification::$prefixDirsPsr4; |
40 | 40 | $loader->classMap = ComposerStaticInitUpdateNotification::$classMap; |
@@ -6,13 +6,13 @@ |
||
6 | 6 | $baseDir = $vendorDir; |
7 | 7 | |
8 | 8 | return array( |
9 | - 'OCA\\UpdateNotification\\AppInfo\\Application' => $baseDir . '/../lib/AppInfo/Application.php', |
|
10 | - 'OCA\\UpdateNotification\\Command\\Check' => $baseDir . '/../lib/Command/Check.php', |
|
11 | - 'OCA\\UpdateNotification\\Controller\\APIController' => $baseDir . '/../lib/Controller/APIController.php', |
|
12 | - 'OCA\\UpdateNotification\\Controller\\AdminController' => $baseDir . '/../lib/Controller/AdminController.php', |
|
13 | - 'OCA\\UpdateNotification\\Notification\\BackgroundJob' => $baseDir . '/../lib/Notification/BackgroundJob.php', |
|
14 | - 'OCA\\UpdateNotification\\Notification\\Notifier' => $baseDir . '/../lib/Notification/Notifier.php', |
|
15 | - 'OCA\\UpdateNotification\\ResetTokenBackgroundJob' => $baseDir . '/../lib/ResetTokenBackgroundJob.php', |
|
16 | - 'OCA\\UpdateNotification\\Settings\\Admin' => $baseDir . '/../lib/Settings/Admin.php', |
|
17 | - 'OCA\\UpdateNotification\\UpdateChecker' => $baseDir . '/../lib/UpdateChecker.php', |
|
9 | + 'OCA\\UpdateNotification\\AppInfo\\Application' => $baseDir.'/../lib/AppInfo/Application.php', |
|
10 | + 'OCA\\UpdateNotification\\Command\\Check' => $baseDir.'/../lib/Command/Check.php', |
|
11 | + 'OCA\\UpdateNotification\\Controller\\APIController' => $baseDir.'/../lib/Controller/APIController.php', |
|
12 | + 'OCA\\UpdateNotification\\Controller\\AdminController' => $baseDir.'/../lib/Controller/AdminController.php', |
|
13 | + 'OCA\\UpdateNotification\\Notification\\BackgroundJob' => $baseDir.'/../lib/Notification/BackgroundJob.php', |
|
14 | + 'OCA\\UpdateNotification\\Notification\\Notifier' => $baseDir.'/../lib/Notification/Notifier.php', |
|
15 | + 'OCA\\UpdateNotification\\ResetTokenBackgroundJob' => $baseDir.'/../lib/ResetTokenBackgroundJob.php', |
|
16 | + 'OCA\\UpdateNotification\\Settings\\Admin' => $baseDir.'/../lib/Settings/Admin.php', |
|
17 | + 'OCA\\UpdateNotification\\UpdateChecker' => $baseDir.'/../lib/UpdateChecker.php', |
|
18 | 18 | ); |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | $notification->setParsedSubject($l->t('Update to %1$s is available.', [$parameters['version']])); |
109 | 109 | |
110 | 110 | if ($this->isAdmin()) { |
111 | - $notification->setLink($this->url->linkToRouteAbsolute('settings.AdminSettings.index', ['section' => 'overview']) . '#version'); |
|
111 | + $notification->setLink($this->url->linkToRouteAbsolute('settings.AdminSettings.index', ['section' => 'overview']).'#version'); |
|
112 | 112 | } |
113 | 113 | } else { |
114 | 114 | $appInfo = $this->getAppInfo($notification->getObjectType()); |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | ]); |
129 | 129 | |
130 | 130 | if ($this->isAdmin()) { |
131 | - $notification->setLink($this->url->linkToRouteAbsolute('settings.AppSettings.viewApps', ['category' => 'updates']) . '#app-' . $notification->getObjectType()); |
|
131 | + $notification->setLink($this->url->linkToRouteAbsolute('settings.AppSettings.viewApps', ['category' => 'updates']).'#app-'.$notification->getObjectType()); |
|
132 | 132 | } |
133 | 133 | } |
134 | 134 |
@@ -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 | ]); |
@@ -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 | } |