@@ -147,7 +147,7 @@ |
||
| 147 | 147 | if (isset($this->entityTypeCollections[$name])) { |
| 148 | 148 | return $this->entityTypeCollections[$name]; |
| 149 | 149 | } |
| 150 | - throw new NotFound('Entity type "' . $name . '" not found."'); |
|
| 150 | + throw new NotFound('Entity type "'.$name.'" not found."'); |
|
| 151 | 151 | } |
| 152 | 152 | |
| 153 | 153 | /** |
@@ -68,7 +68,7 @@ |
||
| 68 | 68 | foreach (['id', 'name'] as $property) { |
| 69 | 69 | $$property = trim($$property); |
| 70 | 70 | if (empty($$property) || !is_string($$property)) { |
| 71 | - throw new \InvalidArgumentException('"' . $property . '" parameter must be non-empty string'); |
|
| 71 | + throw new \InvalidArgumentException('"'.$property.'" parameter must be non-empty string'); |
|
| 72 | 72 | } |
| 73 | 73 | } |
| 74 | 74 | $this->id = $id; |
@@ -85,14 +85,14 @@ discard block |
||
| 85 | 85 | $this->logger = $logger; |
| 86 | 86 | |
| 87 | 87 | $methods = get_class_methods($this->comment); |
| 88 | - $methods = array_filter($methods, function ($name) { |
|
| 88 | + $methods = array_filter($methods, function($name) { |
|
| 89 | 89 | return strpos($name, 'get') === 0; |
| 90 | 90 | }); |
| 91 | 91 | foreach ($methods as $getter) { |
| 92 | 92 | if ($getter === 'getMentions') { |
| 93 | - continue; // special treatment |
|
| 93 | + continue; // special treatment |
|
| 94 | 94 | } |
| 95 | - $name = '{'.self::NS_OWNCLOUD.'}' . lcfirst(substr($getter, 3)); |
|
| 95 | + $name = '{'.self::NS_OWNCLOUD.'}'.lcfirst(substr($getter, 3)); |
|
| 96 | 96 | $this->properties[$name] = $getter; |
| 97 | 97 | } |
| 98 | 98 | $this->userManager = $userManager; |
@@ -197,7 +197,7 @@ discard block |
||
| 197 | 197 | $this->logger->logException($e, ['app' => 'dav/comments']); |
| 198 | 198 | if ($e instanceof MessageTooLongException) { |
| 199 | 199 | $msg = 'Message exceeds allowed character limit of '; |
| 200 | - throw new BadRequest($msg . IComment::MAX_MESSAGE_LENGTH, 0, $e); |
|
| 200 | + throw new BadRequest($msg.IComment::MAX_MESSAGE_LENGTH, 0, $e); |
|
| 201 | 201 | } |
| 202 | 202 | throw $e; |
| 203 | 203 | } |
@@ -283,7 +283,7 @@ discard block |
||
| 283 | 283 | * @return array |
| 284 | 284 | */ |
| 285 | 285 | protected function composeMentionsPropertyValue() { |
| 286 | - return array_map(function ($mention) { |
|
| 286 | + return array_map(function($mention) { |
|
| 287 | 287 | try { |
| 288 | 288 | $displayName = $this->commentsManager->resolveDisplayName($mention['type'], $mention['id']); |
| 289 | 289 | } catch (\OutOfBoundsException $e) { |
@@ -77,7 +77,7 @@ |
||
| 77 | 77 | $path = array_pop($path); |
| 78 | 78 | |
| 79 | 79 | $newName = \OC_Helper::buildNotExistingFileNameForView('/', $path, $this->view); |
| 80 | - $url = $request->getBaseUrl() . $newName; |
|
| 80 | + $url = $request->getBaseUrl().$newName; |
|
| 81 | 81 | $request->setUrl($url); |
| 82 | 82 | } |
| 83 | 83 | } |
@@ -54,7 +54,7 @@ |
||
| 54 | 54 | $output->writeln('Syncing users ...'); |
| 55 | 55 | $progress = new ProgressBar($output); |
| 56 | 56 | $progress->start(); |
| 57 | - $this->syncService->syncInstance(function () use ($progress) { |
|
| 57 | + $this->syncService->syncInstance(function() use ($progress) { |
|
| 58 | 58 | $progress->advance(); |
| 59 | 59 | }); |
| 60 | 60 | |
@@ -58,7 +58,7 @@ |
||
| 58 | 58 | public function getChild($name) { |
| 59 | 59 | $elements = pathinfo($name); |
| 60 | 60 | $ext = isset($elements['extension']) ? $elements['extension'] : ''; |
| 61 | - $size = (int)(isset($elements['filename']) ? $elements['filename'] : '64'); |
|
| 61 | + $size = (int) (isset($elements['filename']) ? $elements['filename'] : '64'); |
|
| 62 | 62 | if (!in_array($ext, ['jpeg', 'png'], true)) { |
| 63 | 63 | throw new MethodNotAllowed('File format not allowed'); |
| 64 | 64 | } |
@@ -89,7 +89,7 @@ |
||
| 89 | 89 | public function getLastModified() { |
| 90 | 90 | $timestamp = $this->avatar->getFile($this->size)->getMTime(); |
| 91 | 91 | if (!empty($timestamp)) { |
| 92 | - return (int)$timestamp; |
|
| 92 | + return (int) $timestamp; |
|
| 93 | 93 | } |
| 94 | 94 | return $timestamp; |
| 95 | 95 | } |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | |
| 40 | 40 | public function xmlSerialize(Writer $writer) { |
| 41 | 41 | foreach ($this->groups as $group) { |
| 42 | - $writer->writeElement('{' . self::NS_OWNCLOUD . '}group', $group); |
|
| 42 | + $writer->writeElement('{'.self::NS_OWNCLOUD.'}group', $group); |
|
| 43 | 43 | } |
| 44 | 44 | } |
| 45 | 45 | } |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | if ($ex->getCode() === Http::STATUS_UNAUTHORIZED) { |
| 97 | 97 | // remote server revoked access to the address book, remove it |
| 98 | 98 | $this->backend->deleteAddressBook($addressBookId); |
| 99 | - $this->logger->info('Authorization failed, remove address book: ' . $url, ['app' => 'dav']); |
|
| 99 | + $this->logger->info('Authorization failed, remove address book: '.$url, ['app' => 'dav']); |
|
| 100 | 100 | throw $ex; |
| 101 | 101 | } |
| 102 | 102 | } |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | */ |
| 170 | 170 | protected function getClient($url, $userName, $sharedSecret) { |
| 171 | 171 | $settings = [ |
| 172 | - 'baseUri' => $url . '/', |
|
| 172 | + 'baseUri' => $url.'/', |
|
| 173 | 173 | 'userName' => $userName, |
| 174 | 174 | 'password' => $sharedSecret, |
| 175 | 175 | ]; |
@@ -306,7 +306,7 @@ discard block |
||
| 306 | 306 | if (is_null($this->localSystemAddressBook)) { |
| 307 | 307 | $systemPrincipal = "principals/system/system"; |
| 308 | 308 | $this->localSystemAddressBook = $this->ensureSystemAddressBookExists($systemPrincipal, 'system', [ |
| 309 | - '{' . Plugin::NS_CARDDAV . '}addressbook-description' => 'System addressbook which holds all users of this instance' |
|
| 309 | + '{'.Plugin::NS_CARDDAV.'}addressbook-description' => 'System addressbook which holds all users of this instance' |
|
| 310 | 310 | ]); |
| 311 | 311 | } |
| 312 | 312 | |
@@ -315,7 +315,7 @@ discard block |
||
| 315 | 315 | |
| 316 | 316 | public function syncInstance(\Closure $progressCallback = null) { |
| 317 | 317 | $systemAddressBook = $this->getLocalSystemAddressBook(); |
| 318 | - $this->userManager->callForAllUsers(function ($user) use ($systemAddressBook, $progressCallback) { |
|
| 318 | + $this->userManager->callForAllUsers(function($user) use ($systemAddressBook, $progressCallback) { |
|
| 319 | 319 | $this->updateUser($user); |
| 320 | 320 | if (!is_null($progressCallback)) { |
| 321 | 321 | $progressCallback(); |