@@ -67,11 +67,11 @@ |
||
| 67 | 67 | */ |
| 68 | 68 | protected function writeModuleList(InputInterface $input, OutputInterface $output, $items) { |
| 69 | 69 | if ($input->getOption('output') === self::OUTPUT_FORMAT_PLAIN) { |
| 70 | - array_walk($items, function (&$item) { |
|
| 70 | + array_walk($items, function(&$item) { |
|
| 71 | 71 | if (!$item['default']) { |
| 72 | 72 | $item = $item['displayName']; |
| 73 | 73 | } else { |
| 74 | - $item = $item['displayName'] . ' [default*]'; |
|
| 74 | + $item = $item['displayName'].' [default*]'; |
|
| 75 | 75 | } |
| 76 | 76 | }); |
| 77 | 77 | } |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | $this |
| 47 | 47 | ->setIdentifier($invalidId) |
| 48 | 48 | ->setStorageClass('\OC\Files\Storage\FailedStorage') |
| 49 | - ->setText('Unknown storage backend ' . $invalidId); |
|
| 49 | + ->setText('Unknown storage backend '.$invalidId); |
|
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | /** |
@@ -58,8 +58,8 @@ discard block |
||
| 58 | 58 | return $this->invalidId; |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | - public function manipulateStorageConfig(StorageConfig &$storage, IUser $user = null) { |
|
| 62 | - $storage->setBackendOption('exception', new \Exception('Unknown storage backend "' . $this->invalidId . '"', StorageNotAvailableException::STATUS_ERROR)); |
|
| 61 | + public function manipulateStorageConfig(StorageConfig & $storage, IUser $user = null) { |
|
| 62 | + $storage->setBackendOption('exception', new \Exception('Unknown storage backend "'.$this->invalidId.'"', StorageNotAvailableException::STATUS_ERROR)); |
|
| 63 | 63 | } |
| 64 | 64 | } |
| 65 | 65 | |
@@ -6,5 +6,5 @@ |
||
| 6 | 6 | $baseDir = $vendorDir; |
| 7 | 7 | |
| 8 | 8 | return array( |
| 9 | - 'OCA\\Files_Sharing\\' => array($baseDir . '/../lib'), |
|
| 9 | + 'OCA\\Files_Sharing\\' => array($baseDir.'/../lib'), |
|
| 10 | 10 | ); |
@@ -6,5 +6,5 @@ |
||
| 6 | 6 | $baseDir = $vendorDir; |
| 7 | 7 | |
| 8 | 8 | return array( |
| 9 | - 'OCA\\AdminAudit\\' => array($baseDir . '/../lib'), |
|
| 9 | + 'OCA\\AdminAudit\\' => array($baseDir.'/../lib'), |
|
| 10 | 10 | ); |
@@ -6,5 +6,5 @@ |
||
| 6 | 6 | $baseDir = $vendorDir; |
| 7 | 7 | |
| 8 | 8 | return array( |
| 9 | - 'OCA\\DAV\\' => array($baseDir . '/../lib'), |
|
| 9 | + 'OCA\\DAV\\' => array($baseDir.'/../lib'), |
|
| 10 | 10 | ); |
@@ -6,5 +6,5 @@ |
||
| 6 | 6 | $baseDir = $vendorDir; |
| 7 | 7 | |
| 8 | 8 | return array( |
| 9 | - 'OCA\\Comments\\' => array($baseDir . '/../lib'), |
|
| 9 | + 'OCA\\Comments\\' => array($baseDir.'/../lib'), |
|
| 10 | 10 | ); |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | * @return string The of of the remote server with protocol |
| 66 | 66 | */ |
| 67 | 67 | public function getFullUrl() { |
| 68 | - return $this->getProtocol() . '://' . $this->getUrl(); |
|
| 68 | + return $this->getProtocol().'://'.$this->getUrl(); |
|
| 69 | 69 | } |
| 70 | 70 | |
| 71 | 71 | /** |
@@ -103,17 +103,17 @@ discard block |
||
| 103 | 103 | if ($this->status) { |
| 104 | 104 | return $this->status; |
| 105 | 105 | } |
| 106 | - $key = 'remote/' . $this->url . '/status'; |
|
| 107 | - $httpsKey = 'remote/' . $this->url . '/https'; |
|
| 106 | + $key = 'remote/'.$this->url.'/status'; |
|
| 107 | + $httpsKey = 'remote/'.$this->url.'/https'; |
|
| 108 | 108 | $status = $this->cache->get($key); |
| 109 | 109 | if (!$status) { |
| 110 | - $response = $this->downloadStatus('https://' . $this->getUrl() . '/status.php'); |
|
| 110 | + $response = $this->downloadStatus('https://'.$this->getUrl().'/status.php'); |
|
| 111 | 111 | $protocol = 'https'; |
| 112 | 112 | if (!$response) { |
| 113 | 113 | if ($status = $this->cache->get($httpsKey)) { |
| 114 | - throw new \Exception('refusing to connect to remote instance(' . $this->url . ') over http that was previously accessible over https'); |
|
| 114 | + throw new \Exception('refusing to connect to remote instance('.$this->url.') over http that was previously accessible over https'); |
|
| 115 | 115 | } |
| 116 | - $response = $this->downloadStatus('http://' . $this->getUrl() . '/status.php'); |
|
| 116 | + $response = $this->downloadStatus('http://'.$this->getUrl().'/status.php'); |
|
| 117 | 117 | $protocol = 'http'; |
| 118 | 118 | } else { |
| 119 | 119 | $this->cache->set($httpsKey, true, 60 * 60 * 24 * 365); |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | $this->cache->set($key, $status, 5 * 60); |
| 127 | 127 | $this->status = $status; |
| 128 | 128 | } else { |
| 129 | - throw new NotFoundException('Remote server not found at address ' . $this->url); |
|
| 129 | + throw new NotFoundException('Remote server not found at address '.$this->url); |
|
| 130 | 130 | } |
| 131 | 131 | } |
| 132 | 132 | return $status; |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | * @throws \InvalidArgumentException |
| 61 | 61 | */ |
| 62 | 62 | protected function request($method, $url, array $body = [], array $query = [], array $headers = []) { |
| 63 | - $fullUrl = trim($this->instance->getFullUrl(), '/') . '/' . $url; |
|
| 63 | + $fullUrl = trim($this->instance->getFullUrl(), '/').'/'.$url; |
|
| 64 | 64 | $options = [ |
| 65 | 65 | 'query' => $query, |
| 66 | 66 | 'headers' => $this->addDefaultHeaders($headers), |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | $response = $client->options($fullUrl, $options); |
| 90 | 90 | break; |
| 91 | 91 | default: |
| 92 | - throw new \InvalidArgumentException('Invalid method ' . $method); |
|
| 92 | + throw new \InvalidArgumentException('Invalid method '.$method); |
|
| 93 | 93 | } |
| 94 | 94 | |
| 95 | 95 | return $response->getBody(); |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | */ |
| 44 | 44 | protected function request($method, $url, array $body = [], array $query = [], array $headers = []) { |
| 45 | 45 | try { |
| 46 | - $response = json_decode(parent::request($method, 'ocs/v2.php/' . $url, $body, $query, $headers), true); |
|
| 46 | + $response = json_decode(parent::request($method, 'ocs/v2.php/'.$url, $body, $query, $headers), true); |
|
| 47 | 47 | } catch (ClientException $e) { |
| 48 | 48 | if ($e->getResponse()->getStatusCode() === 404) { |
| 49 | 49 | throw new NotFoundException(); |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | throw new NotFoundException(); |
| 64 | 64 | } |
| 65 | 65 | if ($response['ocs']['meta']['status'] !== 'ok') { |
| 66 | - throw new \Exception('Unknown ocs error ' . $response['ocs']['meta']['message']); |
|
| 66 | + throw new \Exception('Unknown ocs error '.$response['ocs']['meta']['message']); |
|
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | return $response['ocs']['data']; |
@@ -78,13 +78,13 @@ discard block |
||
| 78 | 78 | private function checkResponseArray(array $data, $type, array $keys) { |
| 79 | 79 | foreach ($keys as $key) { |
| 80 | 80 | if (!array_key_exists($key, $data)) { |
| 81 | - throw new \Exception('Invalid ' . $type . ' response, expected field ' . $key . ' not found'); |
|
| 81 | + throw new \Exception('Invalid '.$type.' response, expected field '.$key.' not found'); |
|
| 82 | 82 | } |
| 83 | 83 | } |
| 84 | 84 | } |
| 85 | 85 | |
| 86 | 86 | public function getUser($userId) { |
| 87 | - $result = $this->request('get', 'cloud/users/' . $userId); |
|
| 87 | + $result = $this->request('get', 'cloud/users/'.$userId); |
|
| 88 | 88 | $this->checkResponseArray($result, 'user', User::EXPECTED_KEYS); |
| 89 | 89 | return new User($result); |
| 90 | 90 | } |