@@ -37,7 +37,7 @@ |
||
37 | 37 | * @return string[] the keys stored for the app |
38 | 38 | * @since 20.0.0 |
39 | 39 | */ |
40 | - public function getAppKeys(): array ; |
|
40 | + public function getAppKeys(): array; |
|
41 | 41 | |
42 | 42 | /** |
43 | 43 | * Writes a new app wide value |
@@ -357,7 +357,7 @@ discard block |
||
357 | 357 | ); |
358 | 358 | $this->session->remove('oauth.state'); |
359 | 359 | } else { |
360 | - $redirectUri = 'nc://login/server:' . $this->getServerPath() . '&user:' . urlencode($loginName) . '&password:' . urlencode($token); |
|
360 | + $redirectUri = 'nc://login/server:'.$this->getServerPath().'&user:'.urlencode($loginName).'&password:'.urlencode($token); |
|
361 | 361 | |
362 | 362 | // Clear the token from the login here |
363 | 363 | $this->tokenProvider->invalidateToken($sessionId); |
@@ -395,7 +395,7 @@ discard block |
||
395 | 395 | return $response; |
396 | 396 | } |
397 | 397 | |
398 | - $redirectUri = 'nc://login/server:' . $this->getServerPath() . '&user:' . urlencode($user) . '&password:' . urlencode($password); |
|
398 | + $redirectUri = 'nc://login/server:'.$this->getServerPath().'&user:'.urlencode($user).'&password:'.urlencode($password); |
|
399 | 399 | return new Http\RedirectResponse($redirectUri); |
400 | 400 | } |
401 | 401 | |
@@ -418,6 +418,6 @@ discard block |
||
418 | 418 | } |
419 | 419 | } |
420 | 420 | |
421 | - return $protocol . "://" . $this->request->getServerHost() . $serverPostfix; |
|
421 | + return $protocol."://".$this->request->getServerHost().$serverPostfix; |
|
422 | 422 | } |
423 | 423 | } |
@@ -85,13 +85,13 @@ discard block |
||
85 | 85 | return new Card( |
86 | 86 | $this->mapper->find( |
87 | 87 | $this->getUid(), |
88 | - (int)$name |
|
88 | + (int) $name |
|
89 | 89 | ), |
90 | 90 | $this->principalUri, |
91 | 91 | $this->getACL() |
92 | 92 | ); |
93 | 93 | } catch (DoesNotExistException $ex) { |
94 | - throw new NotFound("Contact does not exist: " . $ex->getMessage(), 0, $ex); |
|
94 | + throw new NotFound("Contact does not exist: ".$ex->getMessage(), 0, $ex); |
|
95 | 95 | } |
96 | 96 | } |
97 | 97 | |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | */ |
101 | 101 | public function getChildren(): array { |
102 | 102 | return array_map( |
103 | - function (RecentContact $contact) { |
|
103 | + function(RecentContact $contact) { |
|
104 | 104 | return new Card( |
105 | 105 | $contact, |
106 | 106 | $this->principalUri, |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | try { |
119 | 119 | $this->mapper->find( |
120 | 120 | $this->getUid(), |
121 | - (int)$name |
|
121 | + (int) $name |
|
122 | 122 | ); |
123 | 123 | return true; |
124 | 124 | } catch (DoesNotExistException $e) { |
@@ -147,8 +147,8 @@ discard block |
||
147 | 147 | return [ |
148 | 148 | 'principaluri' => $this->principalUri, |
149 | 149 | '{DAV:}displayname' => $this->l10n->t('Recently contacted'), |
150 | - '{' . Plugin::NS_OWNCLOUD . '}read-only' => true, |
|
151 | - '{' . \OCA\DAV\CalDAV\Plugin::NS_CALENDARSERVER . '}getctag' => 'http://sabre.io/ns/sync/' . ($this->getLastModified() ?? 0), |
|
150 | + '{'.Plugin::NS_OWNCLOUD.'}read-only' => true, |
|
151 | + '{'.\OCA\DAV\CalDAV\Plugin::NS_CALENDARSERVER.'}getctag' => 'http://sabre.io/ns/sync/'.($this->getLastModified() ?? 0), |
|
152 | 152 | ]; |
153 | 153 | } |
154 | 154 |
@@ -95,7 +95,7 @@ |
||
95 | 95 | * @inheritDoc |
96 | 96 | */ |
97 | 97 | public function getETag(): ?string { |
98 | - return '"' . md5((string) $this->getLastModified()) . '"'; |
|
98 | + return '"'.md5((string) $this->getLastModified()).'"'; |
|
99 | 99 | } |
100 | 100 | |
101 | 101 | /** |
@@ -40,7 +40,7 @@ |
||
40 | 40 | |
41 | 41 | public function afterController($controller, $methodName, Response $response) { |
42 | 42 | $etagHeader = $this->request->getHeader('IF_NONE_MATCH'); |
43 | - if ($etagHeader !== '' && $response->getETag() !== null && trim($etagHeader) === '"' . $response->getETag() . '"') { |
|
43 | + if ($etagHeader !== '' && $response->getETag() !== null && trim($etagHeader) === '"'.$response->getETag().'"') { |
|
44 | 44 | $response->setStatus(Http::STATUS_NOT_MODIFIED); |
45 | 45 | return $response; |
46 | 46 | } |
@@ -31,20 +31,20 @@ |
||
31 | 31 | |
32 | 32 | require '../3rdparty/autoload.php'; |
33 | 33 | |
34 | -$locales = array_map(static function (string $localeCode) { |
|
34 | +$locales = array_map(static function(string $localeCode) { |
|
35 | 35 | return [ |
36 | 36 | 'code' => $localeCode, |
37 | 37 | 'name' => Locale::getDisplayName($localeCode, 'en') |
38 | 38 | ]; |
39 | 39 | }, ResourceBundle::getLocales('')); |
40 | 40 | |
41 | -$locales = array_filter($locales, static function (array $locale) { |
|
41 | +$locales = array_filter($locales, static function(array $locale) { |
|
42 | 42 | return is_array(Punic\Data::explodeLocale($locale['code'])); |
43 | 43 | }); |
44 | 44 | |
45 | 45 | $locales = array_values($locales); |
46 | 46 | |
47 | -if (file_put_contents(__DIR__ . '/locales.json', json_encode($locales, JSON_PRETTY_PRINT)) === false) { |
|
47 | +if (file_put_contents(__DIR__.'/locales.json', json_encode($locales, JSON_PRETTY_PRINT)) === false) { |
|
48 | 48 | echo 'Failed to update locales.json'; |
49 | 49 | exit(1); |
50 | 50 | } |
@@ -53,7 +53,7 @@ |
||
53 | 53 | $ip = $input->getArgument('ipaddress'); |
54 | 54 | |
55 | 55 | if (!filter_var($ip, FILTER_VALIDATE_IP)) { |
56 | - $output->writeln('<error>"' . $ip . '" is not a valid IP address</error>'); |
|
56 | + $output->writeln('<error>"'.$ip.'" is not a valid IP address</error>'); |
|
57 | 57 | return 1; |
58 | 58 | } |
59 | 59 |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | if (isset($context[$name])) { |
71 | 71 | $context = $context[$name]; |
72 | 72 | } else { |
73 | - throw new \BadMethodCallException('Invalid context, "' . $name . '" options not set'); |
|
73 | + throw new \BadMethodCallException('Invalid context, "'.$name.'" options not set'); |
|
74 | 74 | } |
75 | 75 | if (isset($context['session']) and $context['session'] instanceof \phpseclib\Net\SFTP) { |
76 | 76 | $this->sftp = $context['session']; |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | |
83 | 83 | public function stream_open($path, $mode, $options, &$opened_path) { |
84 | 84 | [, $path] = explode('://', $path); |
85 | - $path = '/' . ltrim($path); |
|
85 | + $path = '/'.ltrim($path); |
|
86 | 86 | $path = str_replace('//', '/', $path); |
87 | 87 | |
88 | 88 | $this->loadContext('sftp'); |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | if (isset($context[$name])) { |
71 | 71 | $context = $context[$name]; |
72 | 72 | } else { |
73 | - throw new \BadMethodCallException('Invalid context, "' . $name . '" options not set'); |
|
73 | + throw new \BadMethodCallException('Invalid context, "'.$name.'" options not set'); |
|
74 | 74 | } |
75 | 75 | if (isset($context['session']) and $context['session'] instanceof \phpseclib\Net\SFTP) { |
76 | 76 | $this->sftp = $context['session']; |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | |
83 | 83 | public function stream_open($path, $mode, $options, &$opened_path) { |
84 | 84 | [, $path] = explode('://', $path); |
85 | - $path = '/' . ltrim($path); |
|
85 | + $path = '/'.ltrim($path); |
|
86 | 86 | $path = str_replace('//', '/', $path); |
87 | 87 | |
88 | 88 | $this->loadContext('sftp'); |