@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | public static function loadClassLoader($class) |
10 | 10 | { |
11 | 11 | if ('Composer\Autoload\ClassLoader' === $class) { |
12 | - require __DIR__ . '/ClassLoader.php'; |
|
12 | + require __DIR__.'/ClassLoader.php'; |
|
13 | 13 | } |
14 | 14 | } |
15 | 15 | |
@@ -25,11 +25,11 @@ discard block |
||
25 | 25 | |
26 | 26 | $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); |
27 | 27 | if ($useStaticLoader) { |
28 | - require_once __DIR__ . '/autoload_static.php'; |
|
28 | + require_once __DIR__.'/autoload_static.php'; |
|
29 | 29 | |
30 | 30 | call_user_func(\Composer\Autoload\ComposerStaticInitWorkflowEngine::getInitializer($loader)); |
31 | 31 | } else { |
32 | - $classMap = require __DIR__ . '/autoload_classmap.php'; |
|
32 | + $classMap = require __DIR__.'/autoload_classmap.php'; |
|
33 | 33 | if ($classMap) { |
34 | 34 | $loader->addClassMap($classMap); |
35 | 35 | } |
@@ -2,6 +2,6 @@ |
||
2 | 2 | |
3 | 3 | // autoload.php @generated by Composer |
4 | 4 | |
5 | -require_once __DIR__ . '/composer/autoload_real.php'; |
|
5 | +require_once __DIR__.'/composer/autoload_real.php'; |
|
6 | 6 | |
7 | 7 | return ComposerAutoloaderInitWorkflowEngine::getLoader(); |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | $tokens = $this->tokenProvider->getTokenByUser($user->getUID()); |
86 | 86 | |
87 | 87 | /** @var IWipeableToken[] $wipeable */ |
88 | - $wipeable = array_filter($tokens, function (IToken $token) { |
|
88 | + $wipeable = array_filter($tokens, function(IToken $token) { |
|
89 | 89 | return $token instanceof IWipeableToken; |
90 | 90 | }); |
91 | 91 | |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | |
122 | 122 | $dbToken = $e->getToken(); |
123 | 123 | |
124 | - $this->logger->info("user " . $dbToken->getUID() . " started a remote wipe"); |
|
124 | + $this->logger->info("user ".$dbToken->getUID()." started a remote wipe"); |
|
125 | 125 | |
126 | 126 | $this->eventDispatcher->dispatch(RemoteWipeStarted::class, new RemoteWipeStarted($dbToken)); |
127 | 127 | |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | |
150 | 150 | $this->tokenProvider->invalidateToken($token); |
151 | 151 | |
152 | - $this->logger->info("user " . $dbToken->getUID() . " finished a remote wipe"); |
|
152 | + $this->logger->info("user ".$dbToken->getUID()." finished a remote wipe"); |
|
153 | 153 | $this->eventDispatcher->dispatch(RemoteWipeFinished::class, new RemoteWipeFinished($dbToken)); |
154 | 154 | |
155 | 155 | return true; |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | $schema = $this->db->createSchema(); |
93 | 93 | $prefix = $this->config->getSystemValue('dbtableprefix', 'oc_'); |
94 | 94 | |
95 | - $tableName = $prefix . 'accounts'; |
|
95 | + $tableName = $prefix.'accounts'; |
|
96 | 96 | if (!$schema->hasTable($tableName)) { |
97 | 97 | return false; |
98 | 98 | } |
@@ -102,8 +102,8 @@ discard block |
||
102 | 102 | return false; |
103 | 103 | } |
104 | 104 | |
105 | - if ($schema->hasTable($prefix . 'persistent_locks')) { |
|
106 | - $locksTable = $schema->getTable($prefix . 'persistent_locks'); |
|
105 | + if ($schema->hasTable($prefix.'persistent_locks')) { |
|
106 | + $locksTable = $schema->getTable($prefix.'persistent_locks'); |
|
107 | 107 | $foreignKeys = $locksTable->getForeignKeys(); |
108 | 108 | foreach ($foreignKeys as $foreignKey) { |
109 | 109 | if ($tableName === $foreignKey->getForeignTableName()) { |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | public function registerNotifier(\Closure $service, \Closure $info) { |
85 | 85 | $infoData = $info(); |
86 | 86 | $this->logger->logException(new \InvalidArgumentException( |
87 | - 'Notifier ' . $infoData['name'] . ' (id: ' . $infoData['id'] . ') is not considered because it is using the old way to register.' |
|
87 | + 'Notifier '.$infoData['name'].' (id: '.$infoData['id'].') is not considered because it is using the old way to register.' |
|
88 | 88 | )); |
89 | 89 | } |
90 | 90 | |
@@ -110,14 +110,14 @@ discard block |
||
110 | 110 | $app = \OC::$server->query($appClass); |
111 | 111 | } catch (QueryException $e) { |
112 | 112 | $this->logger->logException($e, [ |
113 | - 'message' => 'Failed to load notification app class: ' . $appClass, |
|
113 | + 'message' => 'Failed to load notification app class: '.$appClass, |
|
114 | 114 | 'app' => 'notifications', |
115 | 115 | ]); |
116 | 116 | continue; |
117 | 117 | } |
118 | 118 | |
119 | 119 | if (!($app instanceof IApp)) { |
120 | - $this->logger->error('Notification app class ' . $appClass . ' is not implementing ' . IApp::class, [ |
|
120 | + $this->logger->error('Notification app class '.$appClass.' is not implementing '.IApp::class, [ |
|
121 | 121 | 'app' => 'notifications', |
122 | 122 | ]); |
123 | 123 | continue; |
@@ -144,14 +144,14 @@ discard block |
||
144 | 144 | $notifier = \OC::$server->query($notifierClass); |
145 | 145 | } catch (QueryException $e) { |
146 | 146 | $this->logger->logException($e, [ |
147 | - 'message' => 'Failed to load notification notifier class: ' . $notifierClass, |
|
147 | + 'message' => 'Failed to load notification notifier class: '.$notifierClass, |
|
148 | 148 | 'app' => 'notifications', |
149 | 149 | ]); |
150 | 150 | continue; |
151 | 151 | } |
152 | 152 | |
153 | 153 | if (!($notifier instanceof INotifier)) { |
154 | - $this->logger->error('Notification notifier class ' . $notifierClass . ' is not implementing ' . INotifier::class, [ |
|
154 | + $this->logger->error('Notification notifier class '.$notifierClass.' is not implementing '.INotifier::class, [ |
|
155 | 155 | 'app' => 'notifications', |
156 | 156 | ]); |
157 | 157 | continue; |
@@ -6,7 +6,7 @@ |
||
6 | 6 | $baseDir = $vendorDir; |
7 | 7 | |
8 | 8 | return array( |
9 | - 'OCA\\LookupServerConnector\\AppInfo\\Application' => $baseDir . '/../lib/AppInfo/Application.php', |
|
10 | - 'OCA\\LookupServerConnector\\BackgroundJobs\\RetryJob' => $baseDir . '/../lib/BackgroundJobs/RetryJob.php', |
|
11 | - 'OCA\\LookupServerConnector\\UpdateLookupServer' => $baseDir . '/../lib/UpdateLookupServer.php', |
|
9 | + 'OCA\\LookupServerConnector\\AppInfo\\Application' => $baseDir.'/../lib/AppInfo/Application.php', |
|
10 | + 'OCA\\LookupServerConnector\\BackgroundJobs\\RetryJob' => $baseDir.'/../lib/BackgroundJobs/RetryJob.php', |
|
11 | + 'OCA\\LookupServerConnector\\UpdateLookupServer' => $baseDir.'/../lib/UpdateLookupServer.php', |
|
12 | 12 | ); |
@@ -6,29 +6,29 @@ |
||
6 | 6 | |
7 | 7 | class ComposerStaticInitLookupServerConnector |
8 | 8 | { |
9 | - public static $prefixLengthsPsr4 = array ( |
|
9 | + public static $prefixLengthsPsr4 = array( |
|
10 | 10 | 'O' => |
11 | - array ( |
|
11 | + array( |
|
12 | 12 | 'OCA\\LookupServerConnector\\' => 26, |
13 | 13 | ), |
14 | 14 | ); |
15 | 15 | |
16 | - public static $prefixDirsPsr4 = array ( |
|
16 | + public static $prefixDirsPsr4 = array( |
|
17 | 17 | 'OCA\\LookupServerConnector\\' => |
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\\LookupServerConnector\\AppInfo\\Application' => __DIR__ . '/..' . '/../lib/AppInfo/Application.php', |
|
25 | - 'OCA\\LookupServerConnector\\BackgroundJobs\\RetryJob' => __DIR__ . '/..' . '/../lib/BackgroundJobs/RetryJob.php', |
|
26 | - 'OCA\\LookupServerConnector\\UpdateLookupServer' => __DIR__ . '/..' . '/../lib/UpdateLookupServer.php', |
|
23 | + public static $classMap = array( |
|
24 | + 'OCA\\LookupServerConnector\\AppInfo\\Application' => __DIR__.'/..'.'/../lib/AppInfo/Application.php', |
|
25 | + 'OCA\\LookupServerConnector\\BackgroundJobs\\RetryJob' => __DIR__.'/..'.'/../lib/BackgroundJobs/RetryJob.php', |
|
26 | + 'OCA\\LookupServerConnector\\UpdateLookupServer' => __DIR__.'/..'.'/../lib/UpdateLookupServer.php', |
|
27 | 27 | ); |
28 | 28 | |
29 | 29 | public static function getInitializer(ClassLoader $loader) |
30 | 30 | { |
31 | - return \Closure::bind(function () use ($loader) { |
|
31 | + return \Closure::bind(function() use ($loader) { |
|
32 | 32 | $loader->prefixLengthsPsr4 = ComposerStaticInitLookupServerConnector::$prefixLengthsPsr4; |
33 | 33 | $loader->prefixDirsPsr4 = ComposerStaticInitLookupServerConnector::$prefixDirsPsr4; |
34 | 34 | $loader->classMap = ComposerStaticInitLookupServerConnector::$classMap; |
@@ -61,5 +61,5 @@ |
||
61 | 61 | * @return string|null - The value stored for the key, null if no value stored |
62 | 62 | * @since 17.0.0 |
63 | 63 | */ |
64 | - public function getMetadataForKey(string $key):?string; |
|
64 | + public function getMetadataForKey(string $key): ?string; |
|
65 | 65 | } |
@@ -63,9 +63,9 @@ discard block |
||
63 | 63 | //use the admin login data for the new database user |
64 | 64 | |
65 | 65 | //add prefix to the postgresql user name to prevent collisions |
66 | - $this->dbUser = 'oc_' . strtolower($username); |
|
66 | + $this->dbUser = 'oc_'.strtolower($username); |
|
67 | 67 | //create a new password so we don't need to store the admin config in the config file |
68 | - $this->dbPassword = \OC::$server->getSecureRandom()->generate(30, \OCP\Security\ISecureRandom::CHAR_LOWER . \OCP\Security\ISecureRandom::CHAR_DIGITS); |
|
68 | + $this->dbPassword = \OC::$server->getSecureRandom()->generate(30, \OCP\Security\ISecureRandom::CHAR_LOWER.\OCP\Security\ISecureRandom::CHAR_DIGITS); |
|
69 | 69 | |
70 | 70 | $this->createDBUser($connection); |
71 | 71 | } |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | private function createDatabase(IDBConnection $connection) { |
105 | 105 | if (!$this->databaseExists($connection)) { |
106 | 106 | //The database does not exists... let's create it |
107 | - $query = $connection->prepare("CREATE DATABASE " . addslashes($this->dbName) . " OWNER " . addslashes($this->dbUser)); |
|
107 | + $query = $connection->prepare("CREATE DATABASE ".addslashes($this->dbName)." OWNER ".addslashes($this->dbUser)); |
|
108 | 108 | try { |
109 | 109 | $query->execute(); |
110 | 110 | } catch (DatabaseException $e) { |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | $this->logger->logException($e); |
113 | 113 | } |
114 | 114 | } else { |
115 | - $query = $connection->prepare("REVOKE ALL PRIVILEGES ON DATABASE " . addslashes($this->dbName) . " FROM PUBLIC"); |
|
115 | + $query = $connection->prepare("REVOKE ALL PRIVILEGES ON DATABASE ".addslashes($this->dbName)." FROM PUBLIC"); |
|
116 | 116 | try { |
117 | 117 | $query->execute(); |
118 | 118 | } catch (DatabaseException $e) { |
@@ -148,14 +148,14 @@ discard block |
||
148 | 148 | $i = 1; |
149 | 149 | while ($this->userExists($connection)) { |
150 | 150 | $i++; |
151 | - $this->dbUser = $dbUser . $i; |
|
151 | + $this->dbUser = $dbUser.$i; |
|
152 | 152 | } |
153 | 153 | |
154 | 154 | // create the user |
155 | - $query = $connection->prepare("CREATE USER " . addslashes($this->dbUser) . " CREATEDB PASSWORD '" . addslashes($this->dbPassword) . "'"); |
|
155 | + $query = $connection->prepare("CREATE USER ".addslashes($this->dbUser)." CREATEDB PASSWORD '".addslashes($this->dbPassword)."'"); |
|
156 | 156 | $query->execute(); |
157 | 157 | if ($this->databaseExists($connection)) { |
158 | - $query = $connection->prepare('GRANT CONNECT ON DATABASE ' . addslashes($this->dbName) . ' TO '.addslashes($this->dbUser)); |
|
158 | + $query = $connection->prepare('GRANT CONNECT ON DATABASE '.addslashes($this->dbName).' TO '.addslashes($this->dbUser)); |
|
159 | 159 | $query->execute(); |
160 | 160 | } |
161 | 161 | } catch (DatabaseException $e) { |