@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | throw new \RuntimeException('no instance id!'); |
77 | 77 | } |
78 | 78 | |
79 | - return 'appdata_' . $instanceId; |
|
79 | + return 'appdata_'.$instanceId; |
|
80 | 80 | } |
81 | 81 | |
82 | 82 | protected function getAppDataRootFolder(): Folder { |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | $name = $this->getAppDataFolderName(); |
105 | 105 | |
106 | 106 | try { |
107 | - $this->folder = $this->rootFolder->get($name . '/' . $this->appId); |
|
107 | + $this->folder = $this->rootFolder->get($name.'/'.$this->appId); |
|
108 | 108 | } catch (NotFoundException $e) { |
109 | 109 | $appDataRootFolder = $this->getAppDataRootFolder(); |
110 | 110 | |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | try { |
115 | 115 | $this->folder = $appDataRootFolder->newFolder($this->appId); |
116 | 116 | } catch (NotPermittedException $e) { |
117 | - throw new \RuntimeException('Could not get appdata folder for ' . $this->appId); |
|
117 | + throw new \RuntimeException('Could not get appdata folder for '.$this->appId); |
|
118 | 118 | } |
119 | 119 | } |
120 | 120 | } |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | } |
125 | 125 | |
126 | 126 | public function getFolder(string $name): ISimpleFolder { |
127 | - $key = $this->appId . '/' . $name; |
|
127 | + $key = $this->appId.'/'.$name; |
|
128 | 128 | if ($cachedFolder = $this->folders->get($key)) { |
129 | 129 | if ($cachedFolder instanceof \Exception) { |
130 | 130 | throw $cachedFolder; |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | if ($name === '/') { |
138 | 138 | $node = $this->getAppDataFolder(); |
139 | 139 | } else { |
140 | - $path = $this->getAppDataFolderName() . '/' . $this->appId . '/' . $name; |
|
140 | + $path = $this->getAppDataFolderName().'/'.$this->appId.'/'.$name; |
|
141 | 141 | $node = $this->rootFolder->get($path); |
142 | 142 | } |
143 | 143 | } catch (NotFoundException $e) { |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | } |
153 | 153 | |
154 | 154 | public function newFolder(string $name): ISimpleFolder { |
155 | - $key = $this->appId . '/' . $name; |
|
155 | + $key = $this->appId.'/'.$name; |
|
156 | 156 | $folder = $this->getAppDataFolder()->newFolder($name); |
157 | 157 | |
158 | 158 | $simpleFolder = new SimpleFolder($folder); |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | public function getDirectoryListing(): array { |
164 | 164 | $listing = $this->getAppDataFolder()->getDirectoryListing(); |
165 | 165 | |
166 | - $fileListing = array_map(function (Node $folder) { |
|
166 | + $fileListing = array_map(function(Node $folder) { |
|
167 | 167 | if ($folder instanceof Folder) { |
168 | 168 | return new SimpleFolder($folder); |
169 | 169 | } |
@@ -52,7 +52,7 @@ |
||
52 | 52 | array &$sortedScriptDeps): void { |
53 | 53 | // Detect and log circular dependencies |
54 | 54 | if (isset($parents[$app->getId()])) { |
55 | - $this->logger->error('Circular dependency in app scripts at app ' . $app->getId()); |
|
55 | + $this->logger->error('Circular dependency in app scripts at app '.$app->getId()); |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | // If app has not been visited |
@@ -146,12 +146,12 @@ |
||
146 | 146 | $xml = @simplexml_load_string($body); |
147 | 147 | } |
148 | 148 | if ($xml !== false) { |
149 | - $data['changelogURL'] = (string)$xml->changelog['href']; |
|
149 | + $data['changelogURL'] = (string) $xml->changelog['href']; |
|
150 | 150 | $data['whatsNew'] = []; |
151 | 151 | foreach ($xml->whatsNew as $infoSet) { |
152 | - $data['whatsNew'][(string)$infoSet['lang']] = [ |
|
153 | - 'regular' => (array)$infoSet->regular->item, |
|
154 | - 'admin' => (array)$infoSet->admin->item, |
|
152 | + $data['whatsNew'][(string) $infoSet['lang']] = [ |
|
153 | + 'regular' => (array) $infoSet->regular->item, |
|
154 | + 'admin' => (array) $infoSet->admin->item, |
|
155 | 155 | ]; |
156 | 156 | } |
157 | 157 | } else { |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | public function registerNotifier(\Closure $service, \Closure $info) { |
120 | 120 | $infoData = $info(); |
121 | 121 | $exception = new \InvalidArgumentException( |
122 | - 'Notifier ' . $infoData['name'] . ' (id: ' . $infoData['id'] . ') is not considered because it is using the old way to register.' |
|
122 | + 'Notifier '.$infoData['name'].' (id: '.$infoData['id'].') is not considered because it is using the old way to register.' |
|
123 | 123 | ); |
124 | 124 | $this->logger->error($exception->getMessage(), ['exception' => $exception]); |
125 | 125 | } |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | try { |
146 | 146 | $app = \OC::$server->get($appClass); |
147 | 147 | } catch (ContainerExceptionInterface $e) { |
148 | - $this->logger->error('Failed to load notification app class: ' . $appClass, [ |
|
148 | + $this->logger->error('Failed to load notification app class: '.$appClass, [ |
|
149 | 149 | 'exception' => $e, |
150 | 150 | 'app' => 'notifications', |
151 | 151 | ]); |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | } |
154 | 154 | |
155 | 155 | if (!($app instanceof IApp)) { |
156 | - $this->logger->error('Notification app class ' . $appClass . ' is not implementing ' . IApp::class, [ |
|
156 | + $this->logger->error('Notification app class '.$appClass.' is not implementing '.IApp::class, [ |
|
157 | 157 | 'app' => 'notifications', |
158 | 158 | ]); |
159 | 159 | continue; |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | try { |
178 | 178 | $notifier = \OC::$server->get($notifierService->getService()); |
179 | 179 | } catch (ContainerExceptionInterface $e) { |
180 | - $this->logger->error('Failed to load notification notifier class: ' . $notifierService->getService(), [ |
|
180 | + $this->logger->error('Failed to load notification notifier class: '.$notifierService->getService(), [ |
|
181 | 181 | 'exception' => $e, |
182 | 182 | 'app' => 'notifications', |
183 | 183 | ]); |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | } |
186 | 186 | |
187 | 187 | if (!($notifier instanceof INotifier)) { |
188 | - $this->logger->error('Notification notifier class ' . $notifierService->getService() . ' is not implementing ' . INotifier::class, [ |
|
188 | + $this->logger->error('Notification notifier class '.$notifierService->getService().' is not implementing '.INotifier::class, [ |
|
189 | 189 | 'app' => 'notifications', |
190 | 190 | ]); |
191 | 191 | continue; |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | try { |
206 | 206 | $notifier = \OC::$server->get($notifierClass); |
207 | 207 | } catch (ContainerExceptionInterface $e) { |
208 | - $this->logger->error('Failed to load notification notifier class: ' . $notifierClass, [ |
|
208 | + $this->logger->error('Failed to load notification notifier class: '.$notifierClass, [ |
|
209 | 209 | 'exception' => $e, |
210 | 210 | 'app' => 'notifications', |
211 | 211 | ]); |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | } |
214 | 214 | |
215 | 215 | if (!($notifier instanceof INotifier)) { |
216 | - $this->logger->error('Notification notifier class ' . $notifierClass . ' is not implementing ' . INotifier::class, [ |
|
216 | + $this->logger->error('Notification notifier class '.$notifierClass.' is not implementing '.INotifier::class, [ |
|
217 | 217 | 'app' => 'notifications', |
218 | 218 | ]); |
219 | 219 | continue; |
@@ -52,7 +52,7 @@ |
||
52 | 52 | |
53 | 53 | $result = $qb->select('class') |
54 | 54 | ->from($this->getTableName(), 'auth') |
55 | - ->where($qb->expr()->in('group_id', array_map(function (IGroup $group) use ($qb) { |
|
55 | + ->where($qb->expr()->in('group_id', array_map(function(IGroup $group) use ($qb) { |
|
56 | 56 | return $qb->createNamedParameter($group->getGID()); |
57 | 57 | }, $groups), IQueryBuilder::PARAM_STR)) |
58 | 58 | ->executeQuery(); |
@@ -44,6 +44,6 @@ |
||
44 | 44 | * {@inheritDoc} |
45 | 45 | */ |
46 | 46 | public function newEMailAction(string $icon, string $name, string $email, string $appId = ''): ILinkAction { |
47 | - return $this->newLinkAction($icon, $name, 'mailto:' . $email, $appId); |
|
47 | + return $this->newLinkAction($icon, $name, 'mailto:'.$email, $appId); |
|
48 | 48 | } |
49 | 49 | } |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | ); |
118 | 118 | |
119 | 119 | $userId = $user->getUID(); |
120 | - $contacts = array_filter($allContacts, function ($contact) use ($userId) { |
|
120 | + $contacts = array_filter($allContacts, function($contact) use ($userId) { |
|
121 | 121 | // When searching for multiple results, we strip out the current user |
122 | 122 | if (array_key_exists('UID', $contact)) { |
123 | 123 | return $contact['UID'] !== $userId; |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | return true; |
126 | 126 | }); |
127 | 127 | |
128 | - $entries = array_map(function (array $contact) { |
|
128 | + $entries = array_map(function(array $contact) { |
|
129 | 129 | return $this->contactArrayToEntry($contact); |
130 | 130 | }, $contacts); |
131 | 131 | return $this->filterContacts( |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | |
182 | 182 | $selfUID = $self->getUID(); |
183 | 183 | |
184 | - return array_values(array_filter($entries, function (IEntry $entry) use ($skipLocal, $ownGroupsOnly, $selfGroups, $selfUID, $disallowEnumeration, $restrictEnumerationGroup, $restrictEnumerationPhone, $allowEnumerationFullMatch, $filter) { |
|
184 | + return array_values(array_filter($entries, function(IEntry $entry) use ($skipLocal, $ownGroupsOnly, $selfGroups, $selfUID, $disallowEnumeration, $restrictEnumerationGroup, $restrictEnumerationPhone, $allowEnumerationFullMatch, $filter) { |
|
185 | 185 | if ($entry->getProperty('isLocalSystemBook')) { |
186 | 186 | if ($skipLocal) { |
187 | 187 | return false; |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | * Lets try the multibucket fallback if available |
62 | 62 | */ |
63 | 63 | if ($this->isMultibucketPreviewDistributionEnabled) { |
64 | - return parent::getFolder('old-multibucket/' . $internalFolder); |
|
64 | + return parent::getFolder('old-multibucket/'.$internalFolder); |
|
65 | 65 | } |
66 | 66 | |
67 | 67 | // when there is no further fallback just throw the exception |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | } |
84 | 84 | |
85 | 85 | public static function getInternalFolder(string $name): string { |
86 | - return implode('/', str_split(substr(md5($name), 0, 7))) . '/' . $name; |
|
86 | + return implode('/', str_split(substr(md5($name), 0, 7))).'/'.$name; |
|
87 | 87 | } |
88 | 88 | |
89 | 89 | public function getStorageId(): int { |
@@ -76,7 +76,7 @@ |
||
76 | 76 | $data = [ |
77 | 77 | 'user_id' => $user->getUID(), |
78 | 78 | 'display_name' => $user->getDisplayName(), |
79 | - 'email' => (string)$user->getSystemEMailAddress(), |
|
79 | + 'email' => (string) $user->getSystemEMailAddress(), |
|
80 | 80 | 'cloud_id' => $user->getCloudId(), |
81 | 81 | 'enabled' => $user->isEnabled(), |
82 | 82 | 'groups' => $groups, |