@@ -65,9 +65,9 @@ discard block |
||
| 65 | 65 | if (!str_starts_with($remote, 'http://') && !str_starts_with($remote, 'https://')) { |
| 66 | 66 | // if scheme not specified, we test both; |
| 67 | 67 | try { |
| 68 | - return $this->discover('https://' . $remote, $skipCache); |
|
| 69 | - } catch (OCMProviderException|ConnectException) { |
|
| 70 | - return $this->discover('http://' . $remote, $skipCache); |
|
| 68 | + return $this->discover('https://'.$remote, $skipCache); |
|
| 69 | + } catch (OCMProviderException | ConnectException) { |
|
| 70 | + return $this->discover('http://'.$remote, $skipCache); |
|
| 71 | 71 | } |
| 72 | 72 | } |
| 73 | 73 | |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | $this->remoteProviders[$remote] = $provider; |
| 90 | 90 | return $provider; |
| 91 | 91 | } |
| 92 | - } catch (JsonException|OCMProviderException $e) { |
|
| 92 | + } catch (JsonException | OCMProviderException $e) { |
|
| 93 | 93 | $this->logger->warning('cache issue on ocm discovery', ['exception' => $e]); |
| 94 | 94 | } |
| 95 | 95 | } |
@@ -104,8 +104,8 @@ discard block |
||
| 104 | 104 | $options['verify'] = false; |
| 105 | 105 | } |
| 106 | 106 | $urls = [ |
| 107 | - $remote . '/.well-known/ocm', |
|
| 108 | - $remote . '/ocm-provider', |
|
| 107 | + $remote.'/.well-known/ocm', |
|
| 108 | + $remote.'/ocm-provider', |
|
| 109 | 109 | ]; |
| 110 | 110 | |
| 111 | 111 | |
@@ -140,9 +140,9 @@ discard block |
||
| 140 | 140 | |
| 141 | 141 | |
| 142 | 142 | throw new OCMProviderException('invalid remote ocm endpoint'); |
| 143 | - } catch (JsonException|OCMProviderException) { |
|
| 143 | + } catch (JsonException | OCMProviderException) { |
|
| 144 | 144 | $this->cache->set($remote, false, 5 * 60); |
| 145 | - throw new OCMProviderException('data returned by remote seems invalid - status: ' . ($status ?? '') . ' - body: ' . ($body ?? '')); |
|
| 145 | + throw new OCMProviderException('data returned by remote seems invalid - status: '.($status ?? '').' - body: '.($body ?? '')); |
|
| 146 | 146 | } catch (\Exception $e) { |
| 147 | 147 | $this->cache->set($remote, false, 5 * 60); |
| 148 | 148 | $this->logger->warning('error while discovering ocm provider', [ |
@@ -161,7 +161,7 @@ discard block |
||
| 161 | 161 | return $this->localProvider; |
| 162 | 162 | } |
| 163 | 163 | |
| 164 | - $provider = new OCMProvider('Nextcloud ' . $this->config->getSystemValue('version')); |
|
| 164 | + $provider = new OCMProvider('Nextcloud '.$this->config->getSystemValue('version')); |
|
| 165 | 165 | if (!$this->appConfig->getValueBool('core', ConfigLexicon::OCM_DISCOVERY_ENABLED)) { |
| 166 | 166 | return $provider; |
| 167 | 167 | } |
@@ -202,7 +202,7 @@ discard block |
||
| 202 | 202 | } else { |
| 203 | 203 | $this->logger->debug('ocm public key feature disabled'); |
| 204 | 204 | } |
| 205 | - } catch (SignatoryException|IdentityNotFoundException $e) { |
|
| 205 | + } catch (SignatoryException | IdentityNotFoundException $e) { |
|
| 206 | 206 | $this->logger->warning('cannot generate local signatory', ['exception' => $e]); |
| 207 | 207 | } |
| 208 | 208 | } |