@@ -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) { |
@@ -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 |
@@ -80,9 +80,9 @@ |
||
80 | 80 | } |
81 | 81 | |
82 | 82 | $query = $this->db->getQueryBuilder(); |
83 | - $query->select($query->createFunction('MAX(' . $query->getColumnName('id') . ')')) |
|
83 | + $query->select($query->createFunction('MAX('.$query->getColumnName('id').')')) |
|
84 | 84 | ->from('calendarobjects'); |
85 | - $maxId = (int)$query->execute()->fetchColumn(); |
|
85 | + $maxId = (int) $query->execute()->fetchColumn(); |
|
86 | 86 | |
87 | 87 | $output->info('Add background job'); |
88 | 88 | $this->jobList->add(BuildReminderIndexBackgroundJob::class, [ |
@@ -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 { |