@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | * @param string $value |
48 | 48 | * @return bool |
49 | 49 | */ |
50 | - public function executeCheck($operator, $value) { |
|
50 | + public function executeCheck($operator, $value) { |
|
51 | 51 | $actualValue = $this->getActualValue(); |
52 | 52 | if (in_array($operator, ['is', '!is'])) { |
53 | 53 | switch ($value) { |
@@ -70,10 +70,10 @@ discard block |
||
70 | 70 | return $this->url; |
71 | 71 | } |
72 | 72 | |
73 | - $this->url = $this->request->getServerProtocol() . '://';// E.g. http(s) + :// |
|
74 | - $this->url .= $this->request->getServerHost();// E.g. localhost |
|
75 | - $this->url .= $this->request->getScriptName();// E.g. /nextcloud/index.php |
|
76 | - $this->url .= $this->request->getPathInfo();// E.g. /apps/files_texteditor/ajax/loadfile |
|
73 | + $this->url = $this->request->getServerProtocol().'://'; // E.g. http(s) + :// |
|
74 | + $this->url .= $this->request->getServerHost(); // E.g. localhost |
|
75 | + $this->url .= $this->request->getScriptName(); // E.g. /nextcloud/index.php |
|
76 | + $this->url .= $this->request->getPathInfo(); // E.g. /apps/files_texteditor/ajax/loadfile |
|
77 | 77 | |
78 | 78 | return $this->url; // E.g. https://localhost/nextcloud/index.php/apps/files_texteditor/ajax/loadfile |
79 | 79 | } |
@@ -323,7 +323,7 @@ |
||
323 | 323 | * @return int Check unique ID |
324 | 324 | */ |
325 | 325 | protected function addCheck($class, $operator, $value) { |
326 | - $hash = md5($class . '::' . $operator . '::' . $value); |
|
326 | + $hash = md5($class.'::'.$operator.'::'.$value); |
|
327 | 327 | |
328 | 328 | $query = $this->connection->getQueryBuilder(); |
329 | 329 | $query->select('id') |
@@ -48,7 +48,7 @@ |
||
48 | 48 | if ($uid !== 'admin') { |
49 | 49 | $uid = md5($uid); |
50 | 50 | } |
51 | - return \OC::$server->getConfig()->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data') . '/' . $uid; |
|
51 | + return \OC::$server->getConfig()->getSystemValue('datadirectory', \OC::$SERVERROOT.'/data').'/'.$uid; |
|
52 | 52 | } |
53 | 53 | |
54 | 54 | return false; |
@@ -184,12 +184,12 @@ |
||
184 | 184 | } |
185 | 185 | |
186 | 186 | try { |
187 | - $this->getDisplayNameFromContact($user . '@http://' . $server); |
|
187 | + $this->getDisplayNameFromContact($user.'@http://'.$server); |
|
188 | 188 | } catch (\OutOfBoundsException $e) { |
189 | 189 | } |
190 | 190 | |
191 | 191 | try { |
192 | - $this->getDisplayNameFromContact($user . '@https://' . $server); |
|
192 | + $this->getDisplayNameFromContact($user.'@https://'.$server); |
|
193 | 193 | } catch (\OutOfBoundsException $e) { |
194 | 194 | } |
195 | 195 |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | $token = $argument['token']; |
106 | 106 | $action = $argument['action']; |
107 | 107 | $data = json_decode($argument['data'], true); |
108 | - $try = (int)$argument['try'] + 1; |
|
108 | + $try = (int) $argument['try'] + 1; |
|
109 | 109 | |
110 | 110 | $result = $this->notifications->sendUpdateToRemote($remote, $remoteId, $token, $action, $data, $try); |
111 | 111 | |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | 'token' => $argument['token'], |
129 | 129 | 'data' => $argument['data'], |
130 | 130 | 'action' => $argument['action'], |
131 | - 'try' => (int)$argument['try'] + 1, |
|
131 | + 'try' => (int) $argument['try'] + 1, |
|
132 | 132 | 'lastRun' => time() |
133 | 133 | ] |
134 | 134 | ); |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | * @return bool |
142 | 142 | */ |
143 | 143 | protected function shouldRun(array $argument) { |
144 | - $lastRun = (int)$argument['lastRun']; |
|
144 | + $lastRun = (int) $argument['lastRun']; |
|
145 | 145 | return ((time() - $lastRun) > $this->interval); |
146 | 146 | } |
147 | 147 |
@@ -55,7 +55,7 @@ |
||
55 | 55 | public function generateToken() { |
56 | 56 | $token = $this->secureRandom->generate( |
57 | 57 | self::TOKEN_LENGTH, |
58 | - ISecureRandom::CHAR_LOWER . ISecureRandom::CHAR_UPPER . ISecureRandom::CHAR_DIGITS); |
|
58 | + ISecureRandom::CHAR_LOWER.ISecureRandom::CHAR_UPPER.ISecureRandom::CHAR_DIGITS); |
|
59 | 59 | return $token; |
60 | 60 | } |
61 | 61 |
@@ -60,7 +60,7 @@ |
||
60 | 60 | $progress->start(); |
61 | 61 | $this->syncService->syncThemAll(function($url, $ex) use ($progress, $output) { |
62 | 62 | if ($ex instanceof \Exception) { |
63 | - $output->writeln("Error while syncing $url : " . $ex->getMessage()); |
|
63 | + $output->writeln("Error while syncing $url : ".$ex->getMessage()); |
|
64 | 64 | |
65 | 65 | } else { |
66 | 66 | $progress->advance(); |
@@ -84,7 +84,7 @@ |
||
84 | 84 | */ |
85 | 85 | private function isRequestPublic(RequestInterface $request) { |
86 | 86 | $url = $request->getPath(); |
87 | - $matchingUrls = array_filter($this->publicURLs, function ($publicUrl) use ($url) { |
|
87 | + $matchingUrls = array_filter($this->publicURLs, function($publicUrl) use ($url) { |
|
88 | 88 | return strpos($url, $publicUrl, 0) === 0; |
89 | 89 | }); |
90 | 90 | return !empty($matchingUrls); |
@@ -47,8 +47,8 @@ discard block |
||
47 | 47 | static function xmlDeserialize(Reader $reader) { |
48 | 48 | |
49 | 49 | $elements = $reader->parseInnerTree([ |
50 | - '{' . Plugin::NS_OWNCLOUD. '}set' => 'Sabre\\Xml\\Element\\KeyValue', |
|
51 | - '{' . Plugin::NS_OWNCLOUD . '}remove' => 'Sabre\\Xml\\Element\\KeyValue', |
|
50 | + '{'.Plugin::NS_OWNCLOUD.'}set' => 'Sabre\\Xml\\Element\\KeyValue', |
|
51 | + '{'.Plugin::NS_OWNCLOUD.'}remove' => 'Sabre\\Xml\\Element\\KeyValue', |
|
52 | 52 | ]); |
53 | 53 | |
54 | 54 | $set = []; |
@@ -57,21 +57,21 @@ discard block |
||
57 | 57 | foreach ($elements as $elem) { |
58 | 58 | switch ($elem['name']) { |
59 | 59 | |
60 | - case '{' . Plugin::NS_OWNCLOUD . '}set' : |
|
60 | + case '{'.Plugin::NS_OWNCLOUD.'}set' : |
|
61 | 61 | $sharee = $elem['value']; |
62 | 62 | |
63 | - $sumElem = '{' . Plugin::NS_OWNCLOUD . '}summary'; |
|
64 | - $commonName = '{' . Plugin::NS_OWNCLOUD . '}common-name'; |
|
63 | + $sumElem = '{'.Plugin::NS_OWNCLOUD.'}summary'; |
|
64 | + $commonName = '{'.Plugin::NS_OWNCLOUD.'}common-name'; |
|
65 | 65 | |
66 | 66 | $set[] = [ |
67 | 67 | 'href' => $sharee['{DAV:}href'], |
68 | 68 | 'commonName' => isset($sharee[$commonName]) ? $sharee[$commonName] : null, |
69 | 69 | 'summary' => isset($sharee[$sumElem]) ? $sharee[$sumElem] : null, |
70 | - 'readOnly' => !array_key_exists('{' . Plugin::NS_OWNCLOUD . '}read-write', $sharee), |
|
70 | + 'readOnly' => !array_key_exists('{'.Plugin::NS_OWNCLOUD.'}read-write', $sharee), |
|
71 | 71 | ]; |
72 | 72 | break; |
73 | 73 | |
74 | - case '{' . Plugin::NS_OWNCLOUD . '}remove' : |
|
74 | + case '{'.Plugin::NS_OWNCLOUD.'}remove' : |
|
75 | 75 | $remove[] = $elem['value']['{DAV:}href']; |
76 | 76 | break; |
77 | 77 |