@@ -141,7 +141,7 @@ |
||
141 | 141 | } |
142 | 142 | |
143 | 143 | // wait with registering these until auth is handled and the filesystem is setup |
144 | - $server->on('beforeMethod:*', function () use ($server, $objectTree, $viewCallBack) { |
|
144 | + $server->on('beforeMethod:*', function() use ($server, $objectTree, $viewCallBack) { |
|
145 | 145 | // ensure the skeleton is copied |
146 | 146 | $userFolder = \OC::$server->getUserFolder(); |
147 | 147 |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | * @return boolean |
107 | 107 | */ |
108 | 108 | public function httpGet(RequestInterface $request, ResponseInterface $response):bool { |
109 | - if ($request->getPath() !== 'provisioning/' . AppleProvisioningNode::FILENAME) { |
|
109 | + if ($request->getPath() !== 'provisioning/'.AppleProvisioningNode::FILENAME) { |
|
110 | 110 | return true; |
111 | 111 | } |
112 | 112 | |
@@ -144,19 +144,19 @@ discard block |
||
144 | 144 | $carddavUUID = call_user_func($this->uuidClosure); |
145 | 145 | $profileUUID = call_user_func($this->uuidClosure); |
146 | 146 | |
147 | - $caldavIdentifier = $reverseDomain . '.' . $caldavUUID; |
|
148 | - $carddavIdentifier = $reverseDomain . '.' . $carddavUUID; |
|
149 | - $profileIdentifier = $reverseDomain . '.' . $profileUUID; |
|
147 | + $caldavIdentifier = $reverseDomain.'.'.$caldavUUID; |
|
148 | + $carddavIdentifier = $reverseDomain.'.'.$carddavUUID; |
|
149 | + $profileIdentifier = $reverseDomain.'.'.$profileUUID; |
|
150 | 150 | |
151 | 151 | $caldavDescription = $this->l10n->t('Configures a CalDAV account'); |
152 | - $caldavDisplayname = $description . ' CalDAV'; |
|
152 | + $caldavDisplayname = $description.' CalDAV'; |
|
153 | 153 | $carddavDescription = $this->l10n->t('Configures a CardDAV account'); |
154 | - $carddavDisplayname = $description . ' CardDAV'; |
|
154 | + $carddavDisplayname = $description.' CardDAV'; |
|
155 | 155 | |
156 | - $filename = $userId . '-' . AppleProvisioningNode::FILENAME; |
|
156 | + $filename = $userId.'-'.AppleProvisioningNode::FILENAME; |
|
157 | 157 | |
158 | 158 | $xmlSkeleton = $this->getTemplate(); |
159 | - $body = vsprintf($xmlSkeleton, array_map(function ($v) { |
|
159 | + $body = vsprintf($xmlSkeleton, array_map(function($v) { |
|
160 | 160 | return \htmlspecialchars($v, ENT_XML1, 'UTF-8'); |
161 | 161 | }, [ |
162 | 162 | $description, |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | )); |
183 | 183 | |
184 | 184 | $response->setStatus(200); |
185 | - $response->setHeader('Content-Disposition', 'attachment; filename="' . $filename . '"'); |
|
185 | + $response->setHeader('Content-Disposition', 'attachment; filename="'.$filename.'"'); |
|
186 | 186 | $response->setHeader('Content-Type', 'application/xml; charset=utf-8'); |
187 | 187 | $response->setBody($body); |
188 | 188 |
@@ -60,16 +60,16 @@ discard block |
||
60 | 60 | ], |
61 | 61 | [ |
62 | 62 | 'privilege' => '{DAV:}read', |
63 | - 'principal' => $this->getOwner() . '/calendar-proxy-write', |
|
63 | + 'principal' => $this->getOwner().'/calendar-proxy-write', |
|
64 | 64 | 'protected' => true, |
65 | 65 | ], |
66 | 66 | [ |
67 | 67 | 'privilege' => '{DAV:}read', |
68 | - 'principal' => $this->getOwner() . '/calendar-proxy-read', |
|
68 | + 'principal' => $this->getOwner().'/calendar-proxy-read', |
|
69 | 69 | 'protected' => true, |
70 | 70 | ], |
71 | 71 | [ |
72 | - 'privilege' => '{' . Plugin::NS_CALDAV . '}read-free-busy', |
|
72 | + 'privilege' => '{'.Plugin::NS_CALDAV.'}read-free-busy', |
|
73 | 73 | 'principal' => '{DAV:}authenticated', |
74 | 74 | 'protected' => true, |
75 | 75 | ], |
@@ -89,12 +89,12 @@ discard block |
||
89 | 89 | |
90 | 90 | [ |
91 | 91 | 'privilege' => '{DAV:}read', |
92 | - 'principal' => $this->getOwner() . '/calendar-proxy-write', |
|
92 | + 'principal' => $this->getOwner().'/calendar-proxy-write', |
|
93 | 93 | 'protected' => true, |
94 | 94 | ], |
95 | 95 | [ |
96 | 96 | 'privilege' => '{DAV:}read', |
97 | - 'principal' => $this->getOwner() . '/calendar-proxy-read', |
|
97 | + 'principal' => $this->getOwner().'/calendar-proxy-read', |
|
98 | 98 | 'protected' => true, |
99 | 99 | ], |
100 | 100 |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | } |
78 | 78 | |
79 | 79 | $readOnly = false; |
80 | - $readOnlyIndex = '{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}read-only'; |
|
80 | + $readOnlyIndex = '{'.\OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD.'}read-only'; |
|
81 | 81 | if (isset($calendar[$readOnlyIndex])) { |
82 | 82 | $readOnly = $calendar[$readOnlyIndex]; |
83 | 83 | } |
@@ -85,8 +85,8 @@ discard block |
||
85 | 85 | $calendarTableData[] = [ |
86 | 86 | $calendar['uri'], |
87 | 87 | $calendar['{DAV:}displayname'], |
88 | - $calendar['{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}owner-principal'], |
|
89 | - $calendar['{' . \OCA\DAV\DAV\Sharing\Plugin::NS_NEXTCLOUD . '}owner-displayname'], |
|
88 | + $calendar['{'.\OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD.'}owner-principal'], |
|
89 | + $calendar['{'.\OCA\DAV\DAV\Sharing\Plugin::NS_NEXTCLOUD.'}owner-displayname'], |
|
90 | 90 | $readOnly ? ' x ' : ' ✓ ', |
91 | 91 | ]; |
92 | 92 | } |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | |
92 | 92 | $this->server->xml->namespaceMap[self::NS_OWNCLOUD] = 'oc'; |
93 | 93 | |
94 | - $this->server->xml->classMap['DateTime'] = function (Writer $writer, \DateTime $value) { |
|
94 | + $this->server->xml->classMap['DateTime'] = function(Writer $writer, \DateTime $value) { |
|
95 | 95 | $writer->write(\Sabre\HTTP\toDate($value)); |
96 | 96 | }; |
97 | 97 | |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | // having their own comments marked as unread |
126 | 126 | $node->setReadMarker(null); |
127 | 127 | |
128 | - $url = rtrim($request->getUrl(), '/') . '/' . urlencode($comment->getId()); |
|
128 | + $url = rtrim($request->getUrl(), '/').'/'.urlencode($comment->getId()); |
|
129 | 129 | |
130 | 130 | $response->setHeader('Content-Location', $url); |
131 | 131 | |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | $this::REPORT_PARAM_OFFSET, |
168 | 168 | $this::REPORT_PARAM_TIMESTAMP |
169 | 169 | ]; |
170 | - $ns = '{' . $this::NS_OWNCLOUD . '}'; |
|
170 | + $ns = '{'.$this::NS_OWNCLOUD.'}'; |
|
171 | 171 | foreach ($report as $parameter) { |
172 | 172 | if (!in_array($parameter['name'], $acceptableParameters) || empty($parameter['value'])) { |
173 | 173 | continue; |
@@ -183,11 +183,11 @@ discard block |
||
183 | 183 | |
184 | 184 | $responses = []; |
185 | 185 | foreach ($results as $node) { |
186 | - $nodePath = $this->server->getRequestUri() . '/' . $node->comment->getId(); |
|
186 | + $nodePath = $this->server->getRequestUri().'/'.$node->comment->getId(); |
|
187 | 187 | $resultSet = $this->server->getPropertiesForPath($nodePath, CommentNode::getPropertyNames()); |
188 | 188 | if (isset($resultSet[0]) && isset($resultSet[0][200])) { |
189 | 189 | $responses[] = new Response( |
190 | - $this->server->getBaseUri() . $nodePath, |
|
190 | + $this->server->getBaseUri().$nodePath, |
|
191 | 191 | [200 => $resultSet[0][200]], |
192 | 192 | 200 |
193 | 193 | ); |
@@ -234,7 +234,7 @@ discard block |
||
234 | 234 | } |
235 | 235 | } |
236 | 236 | if (is_null($actorId)) { |
237 | - throw new BadRequest('Invalid actor "' . $actorType .'"'); |
|
237 | + throw new BadRequest('Invalid actor "'.$actorType.'"'); |
|
238 | 238 | } |
239 | 239 | |
240 | 240 | try { |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | throw new BadRequest('Invalid input values', 0, $e); |
248 | 248 | } catch (\OCP\Comments\MessageTooLongException $e) { |
249 | 249 | $msg = 'Message exceeds allowed character limit of '; |
250 | - throw new BadRequest($msg . \OCP\Comments\IComment::MAX_MESSAGE_LENGTH, 0, $e); |
|
250 | + throw new BadRequest($msg.\OCP\Comments\IComment::MAX_MESSAGE_LENGTH, 0, $e); |
|
251 | 251 | } |
252 | 252 | } |
253 | 253 | } |
@@ -99,7 +99,7 @@ |
||
99 | 99 | |
100 | 100 | $templateName = 'exception'; |
101 | 101 | if ($httpCode === 403 || $httpCode === 404) { |
102 | - $templateName = (string)$httpCode; |
|
102 | + $templateName = (string) $httpCode; |
|
103 | 103 | } |
104 | 104 | |
105 | 105 | $content = new OC_Template('core', $templateName, 'guest'); |
@@ -49,10 +49,10 @@ discard block |
||
49 | 49 | |
50 | 50 | private function evaluateScopeId(string $scopeId = null): string { |
51 | 51 | if ($this->scope === IManager::SCOPE_USER |
52 | - && trim((string)$scopeId) === '') { |
|
52 | + && trim((string) $scopeId) === '') { |
|
53 | 53 | throw new \InvalidArgumentException('user scope requires a user id'); |
54 | 54 | } |
55 | - return trim((string)$scopeId); |
|
55 | + return trim((string) $scopeId); |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | /** |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | |
72 | 72 | public function getHash(): string { |
73 | 73 | if ($this->hash === null) { |
74 | - $this->hash = \hash('sha256', $this->getScope() . '::' . $this->getScopeId()); |
|
74 | + $this->hash = \hash('sha256', $this->getScope().'::'.$this->getScopeId()); |
|
75 | 75 | } |
76 | 76 | return $this->hash; |
77 | 77 | } |
@@ -111,7 +111,7 @@ |
||
111 | 111 | while (!empty($parents)) { |
112 | 112 | $qb = \OC::$server->getDatabaseConnection()->getQueryBuilder(); |
113 | 113 | |
114 | - $parents = array_map(function ($parent) use ($qb) { |
|
114 | + $parents = array_map(function($parent) use ($qb) { |
|
115 | 115 | return $qb->createNamedParameter($parent); |
116 | 116 | }, $parents); |
117 | 117 |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | } |
61 | 61 | $userFolder = $this->rootFolder->getUserFolder($user->getUID()); |
62 | 62 | /** @var Node[] $nodes */ |
63 | - $nodes = $userFolder->getById((int)$context['itemId']); |
|
63 | + $nodes = $userFolder->getById((int) $context['itemId']); |
|
64 | 64 | if (count($nodes) === 0) { |
65 | 65 | return; |
66 | 66 | } |
@@ -74,11 +74,11 @@ discard block |
||
74 | 74 | // at least on PHP 5.6 usort turned out to be not stable. So we add |
75 | 75 | // the current index to the value and compare it on a draw |
76 | 76 | $i = 0; |
77 | - $workArray = array_map(function ($element) use (&$i) { |
|
77 | + $workArray = array_map(function($element) use (&$i) { |
|
78 | 78 | return [$i++, $element]; |
79 | 79 | }, $byType); |
80 | 80 | |
81 | - usort($workArray, function ($a, $b) use ($al, $type) { |
|
81 | + usort($workArray, function($a, $b) use ($al, $type) { |
|
82 | 82 | $result = $this->compare($a[1], $b[1], $al[$type]); |
83 | 83 | if ($result === 0) { |
84 | 84 | $result = $a[0] - $b[0]; |
@@ -101,8 +101,8 @@ discard block |
||
101 | 101 | $a = $a['value']['shareWith']; |
102 | 102 | $b = $b['value']['shareWith']; |
103 | 103 | |
104 | - $valueA = (int)in_array($a, $al, true); |
|
105 | - $valueB = (int)in_array($b, $al, true); |
|
104 | + $valueA = (int) in_array($a, $al, true); |
|
105 | + $valueB = (int) in_array($b, $al, true); |
|
106 | 106 | |
107 | 107 | return $valueB - $valueA; |
108 | 108 | } |