@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | * @return resource|string |
60 | 60 | */ |
61 | 61 | protected function request($method, $url, array $body = [], array $query = [], array $headers = []) { |
62 | - $fullUrl = trim($this->instance->getFullUrl(), '/') . '/' . $url; |
|
62 | + $fullUrl = trim($this->instance->getFullUrl(), '/').'/'.$url; |
|
63 | 63 | $options = [ |
64 | 64 | 'query' => $query, |
65 | 65 | 'headers' => $this->addDefaultHeaders($headers), |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | $response = $client->options($fullUrl, $options); |
89 | 89 | break; |
90 | 90 | default: |
91 | - throw new \InvalidArgumentException('Invalid method ' . $method); |
|
91 | + throw new \InvalidArgumentException('Invalid method '.$method); |
|
92 | 92 | } |
93 | 93 | |
94 | 94 | return $response->getBody(); |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | */ |
42 | 42 | protected function request($method, $url, array $body = [], array $query = [], array $headers = []) { |
43 | 43 | try { |
44 | - $response = json_decode(parent::request($method, '/ocs/v2.php/' . $url, $body, $query, $headers), true); |
|
44 | + $response = json_decode(parent::request($method, '/ocs/v2.php/'.$url, $body, $query, $headers), true); |
|
45 | 45 | } catch (ClientException $e) { |
46 | 46 | if ($e->getResponse()->getStatusCode() === 404) { |
47 | 47 | throw new NotFoundException(); |
@@ -61,14 +61,14 @@ discard block |
||
61 | 61 | throw new NotFoundException(); |
62 | 62 | } |
63 | 63 | if ($response['ocs']['meta']['status'] !== 'ok') { |
64 | - throw new \Exception('Unknown ocs error ' . $response['ocs']['meta']['message']); |
|
64 | + throw new \Exception('Unknown ocs error '.$response['ocs']['meta']['message']); |
|
65 | 65 | } |
66 | 66 | |
67 | 67 | return $response['ocs']['data']; |
68 | 68 | } |
69 | 69 | |
70 | 70 | public function getUser($userId) { |
71 | - return new User($this->request('get', 'cloud/users/' . $userId)); |
|
71 | + return new User($this->request('get', 'cloud/users/'.$userId)); |
|
72 | 72 | } |
73 | 73 | |
74 | 74 | /** |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | * @return string The of of the remote server with protocol |
64 | 64 | */ |
65 | 65 | public function getFullUrl() { |
66 | - return $this->getProtocol() . '://' . $this->getUrl(); |
|
66 | + return $this->getProtocol().'://'.$this->getUrl(); |
|
67 | 67 | } |
68 | 68 | |
69 | 69 | /** |
@@ -96,13 +96,13 @@ discard block |
||
96 | 96 | if ($this->status) { |
97 | 97 | return $this->status; |
98 | 98 | } |
99 | - $key = 'remote/' . $this->url . '/status'; |
|
99 | + $key = 'remote/'.$this->url.'/status'; |
|
100 | 100 | $status = $this->cache->get($key); |
101 | 101 | if (!$status) { |
102 | - $response = $this->downloadStatus('https://' . $this->getUrl() . '/status.php'); |
|
102 | + $response = $this->downloadStatus('https://'.$this->getUrl().'/status.php'); |
|
103 | 103 | $protocol = 'https'; |
104 | 104 | if (!$response) { |
105 | - $response = $this->downloadStatus('http://' . $this->getUrl() . '/status.php'); |
|
105 | + $response = $this->downloadStatus('http://'.$this->getUrl().'/status.php'); |
|
106 | 106 | $protocol = 'http'; |
107 | 107 | } |
108 | 108 | $status = json_decode($response, true); |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | $this->cache->set($key, $status, 5 * 60); |
114 | 114 | $this->status = $status; |
115 | 115 | } else { |
116 | - throw new NotFoundException('Remote server not found at address ' . $this->url); |
|
116 | + throw new NotFoundException('Remote server not found at address '.$this->url); |
|
117 | 117 | } |
118 | 118 | } |
119 | 119 | return $status; |