@@ -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; |
@@ -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; |
@@ -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) { |
@@ -60,10 +60,10 @@ |
||
60 | 60 | */ |
61 | 61 | public function mergePolicies(FeaturePolicy $defaultPolicy, |
62 | 62 | EmptyFeaturePolicy $originalPolicy): FeaturePolicy { |
63 | - foreach ((object)(array)$originalPolicy as $name => $value) { |
|
64 | - $setter = 'set' . ucfirst($name); |
|
63 | + foreach ((object) (array) $originalPolicy as $name => $value) { |
|
64 | + $setter = 'set'.ucfirst($name); |
|
65 | 65 | if (\is_array($value)) { |
66 | - $getter = 'get' . ucfirst($name); |
|
66 | + $getter = 'get'.ucfirst($name); |
|
67 | 67 | $currentValues = \is_array($defaultPolicy->$getter()) ? $defaultPolicy->$getter() : []; |
68 | 68 | $defaultPolicy->$setter(\array_values(\array_unique(\array_merge($currentValues, $value)))); |
69 | 69 | } elseif (\is_bool($value)) { |
@@ -139,42 +139,42 @@ |
||
139 | 139 | if (empty($this->autoplayDomains)) { |
140 | 140 | $policy .= "autoplay 'none';"; |
141 | 141 | } else { |
142 | - $policy .= 'autoplay ' . implode(' ', $this->autoplayDomains); |
|
142 | + $policy .= 'autoplay '.implode(' ', $this->autoplayDomains); |
|
143 | 143 | $policy .= ';'; |
144 | 144 | } |
145 | 145 | |
146 | 146 | if (empty($this->cameraDomains)) { |
147 | 147 | $policy .= "camera 'none';"; |
148 | 148 | } else { |
149 | - $policy .= 'camera ' . implode(' ', $this->cameraDomains); |
|
149 | + $policy .= 'camera '.implode(' ', $this->cameraDomains); |
|
150 | 150 | $policy .= ';'; |
151 | 151 | } |
152 | 152 | |
153 | 153 | if (empty($this->fullscreenDomains)) { |
154 | 154 | $policy .= "fullscreen 'none';"; |
155 | 155 | } else { |
156 | - $policy .= 'fullscreen ' . implode(' ', $this->fullscreenDomains); |
|
156 | + $policy .= 'fullscreen '.implode(' ', $this->fullscreenDomains); |
|
157 | 157 | $policy .= ';'; |
158 | 158 | } |
159 | 159 | |
160 | 160 | if (empty($this->geolocationDomains)) { |
161 | 161 | $policy .= "geolocation 'none';"; |
162 | 162 | } else { |
163 | - $policy .= 'geolocation ' . implode(' ', $this->geolocationDomains); |
|
163 | + $policy .= 'geolocation '.implode(' ', $this->geolocationDomains); |
|
164 | 164 | $policy .= ';'; |
165 | 165 | } |
166 | 166 | |
167 | 167 | if (empty($this->microphoneDomains)) { |
168 | 168 | $policy .= "microphone 'none';"; |
169 | 169 | } else { |
170 | - $policy .= 'microphone ' . implode(' ', $this->microphoneDomains); |
|
170 | + $policy .= 'microphone '.implode(' ', $this->microphoneDomains); |
|
171 | 171 | $policy .= ';'; |
172 | 172 | } |
173 | 173 | |
174 | 174 | if (empty($this->paymentDomains)) { |
175 | 175 | $policy .= "payment 'none';"; |
176 | 176 | } else { |
177 | - $policy .= 'payment ' . implode(' ', $this->paymentDomains); |
|
177 | + $policy .= 'payment '.implode(' ', $this->paymentDomains); |
|
178 | 178 | $policy .= ';'; |
179 | 179 | } |
180 | 180 |
@@ -42,7 +42,7 @@ |
||
42 | 42 | */ |
43 | 43 | public function changeSchema(IOutput $output, |
44 | 44 | \Closure $schemaClosure, |
45 | - array $options):?ISchemaWrapper { |
|
45 | + array $options): ?ISchemaWrapper { |
|
46 | 46 | /** @var ISchemaWrapper $schema */ |
47 | 47 | $schema = $schemaClosure(); |
48 | 48 |
@@ -36,11 +36,11 @@ |
||
36 | 36 | } |
37 | 37 | |
38 | 38 | public function getMimeType(): string { |
39 | - return (string)$this->providerV1->getMimeType(); |
|
39 | + return (string) $this->providerV1->getMimeType(); |
|
40 | 40 | } |
41 | 41 | |
42 | 42 | public function isAvailable(FileInfo $file): bool { |
43 | - return (bool)$this->providerV1->isAvailable($file); |
|
43 | + return (bool) $this->providerV1->isAvailable($file); |
|
44 | 44 | } |
45 | 45 | |
46 | 46 | public function getThumbnail(File $file, int $maxX, int $maxY): ?IImage { |