PluginProbe
Media Cloud Sync / 1.4.2
Media Cloud Sync v1.4.2
1.4.2 1.4.1 1.4.0 1.3.12 1.3.11 1.3.10 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.2.0 1.2.10 1.2.11 1.2.12 1.2.13 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 All 36 releases
← All changes | includes/sdk/google/guzzlehttp/guzzle/src/ClientTrait.php +19 -19 1.2.4 → 1.4.2 View file →
@@ -1,12 +1,12 @@
1 1 <?php
2 2
3 -namespace Dudlewebs\WPMCS\GuzzleHttp;
3 +namespace Dudlewebs\WPMCS\GCP\GuzzleHttp;
4 4
5 -use Dudlewebs\WPMCS\GuzzleHttp\Exception\GuzzleException;
6 -use Dudlewebs\WPMCS\GuzzleHttp\Promise\PromiseInterface;
7 -use Dudlewebs\WPMCS\Psr\Http\Message\ResponseInterface;
8 -use Dudlewebs\WPMCS\Psr\Http\Message\UriInterface;
5 +use Dudlewebs\WPMCS\GCP\GuzzleHttp\Exception\GuzzleException;
6 +use Dudlewebs\WPMCS\GCP\GuzzleHttp\Promise\PromiseInterface;
7 +use Dudlewebs\WPMCS\GCP\Psr\Http\Message\ResponseInterface;
8 +use Dudlewebs\WPMCS\GCP\Psr\Http\Message\UriInterface;
9 9 /**
10 10 * Client interface for sending HTTP requests.
11 11 */
12 12 trait ClientTrait
@@ -23,9 +23,9 @@
23 23 * @param array $options Request options to apply.
24 24 *
25 25 * @throws GuzzleException
26 26 */
27 - abstract public function request(string $method, $uri, array $options = []): ResponseInterface;
27 + public abstract function request(string $method, $uri, array $options = []) : ResponseInterface;
28 28 /**
29 29 * Create and send an HTTP GET request.
30 30 *
31 31 * Use an absolute path to override the base path of the client, or a
@@ -36,9 +36,9 @@
36 36 * @param array $options Request options to apply.
37 37 *
38 38 * @throws GuzzleException
39 39 */
40 - public function get($uri, array $options = []): ResponseInterface
40 + public function get($uri, array $options = []) : ResponseInterface
41 41 {
42 42 return $this->request('GET', $uri, $options);
43 43 }
44 44 /**
@@ -52,9 +52,9 @@
52 52 * @param array $options Request options to apply.
53 53 *
54 54 * @throws GuzzleException
55 55 */
56 - public function head($uri, array $options = []): ResponseInterface
56 + public function head($uri, array $options = []) : ResponseInterface
57 57 {
58 58 return $this->request('HEAD', $uri, $options);
59 59 }
60 60 /**
@@ -68,9 +68,9 @@
68 68 * @param array $options Request options to apply.
69 69 *
70 70 * @throws GuzzleException
71 71 */
72 - public function put($uri, array $options = []): ResponseInterface
72 + public function put($uri, array $options = []) : ResponseInterface
73 73 {
74 74 return $this->request('PUT', $uri, $options);
75 75 }
76 76 /**
@@ -84,9 +84,9 @@
84 84 * @param array $options Request options to apply.
85 85 *
86 86 * @throws GuzzleException
87 87 */
88 - public function post($uri, array $options = []): ResponseInterface
88 + public function post($uri, array $options = []) : ResponseInterface
89 89 {
90 90 return $this->request('POST', $uri, $options);
91 91 }
92 92 /**
@@ -100,9 +100,9 @@
100 100 * @param array $options Request options to apply.
101 101 *
102 102 * @throws GuzzleException
103 103 */
104 - public function patch($uri, array $options = []): ResponseInterface
104 + public function patch($uri, array $options = []) : ResponseInterface
105 105 {
106 106 return $this->request('PATCH', $uri, $options);
107 107 }
108 108 /**
@@ -116,9 +116,9 @@
116 116 * @param array $options Request options to apply.
117 117 *
118 118 * @throws GuzzleException
119 119 */
120 - public function delete($uri, array $options = []): ResponseInterface
120 + public function delete($uri, array $options = []) : ResponseInterface
121 121 {
122 122 return $this->request('DELETE', $uri, $options);
123 123 }
124 124 /**
@@ -132,9 +132,9 @@
132 132 * @param string $method HTTP method
133 133 * @param string|UriInterface $uri URI object or string.
134 134 * @param array $options Request options to apply.
135 135 */
136 - abstract public function requestAsync(string $method, $uri, array $options = []): PromiseInterface;
136 + public abstract function requestAsync(string $method, $uri, array $options = []) : PromiseInterface;
137 137 /**
138 138 * Create and send an asynchronous HTTP GET request.
139 139 *
140 140 * Use an absolute path to override the base path of the client, or a
@@ -144,9 +144,9 @@
144 144 *
145 145 * @param string|UriInterface $uri URI object or string.
146 146 * @param array $options Request options to apply.
147 147 */
148 - public function getAsync($uri, array $options = []): PromiseInterface
148 + public function getAsync($uri, array $options = []) : PromiseInterface
149 149 {
150 150 return $this->requestAsync('GET', $uri, $options);
151 151 }
152 152 /**
@@ -159,9 +159,9 @@
159 159 *
160 160 * @param string|UriInterface $uri URI object or string.
161 161 * @param array $options Request options to apply.
162 162 */
163 - public function headAsync($uri, array $options = []): PromiseInterface
163 + public function headAsync($uri, array $options = []) : PromiseInterface
164 164 {
165 165 return $this->requestAsync('HEAD', $uri, $options);
166 166 }
167 167 /**
@@ -174,9 +174,9 @@
174 174 *
175 175 * @param string|UriInterface $uri URI object or string.
176 176 * @param array $options Request options to apply.
177 177 */
178 - public function putAsync($uri, array $options = []): PromiseInterface
178 + public function putAsync($uri, array $options = []) : PromiseInterface
179 179 {
180 180 return $this->requestAsync('PUT', $uri, $options);
181 181 }
182 182 /**
@@ -189,9 +189,9 @@
189 189 *
190 190 * @param string|UriInterface $uri URI object or string.
191 191 * @param array $options Request options to apply.
192 192 */
193 - public function postAsync($uri, array $options = []): PromiseInterface
193 + public function postAsync($uri, array $options = []) : PromiseInterface
194 194 {
195 195 return $this->requestAsync('POST', $uri, $options);
196 196 }
197 197 /**
@@ -204,9 +204,9 @@
204 204 *
205 205 * @param string|UriInterface $uri URI object or string.
206 206 * @param array $options Request options to apply.
207 207 */
208 - public function patchAsync($uri, array $options = []): PromiseInterface
208 + public function patchAsync($uri, array $options = []) : PromiseInterface
209 209 {
210 210 return $this->requestAsync('PATCH', $uri, $options);
211 211 }
212 212 /**
@@ -219,9 +219,9 @@
219 219 *
220 220 * @param string|UriInterface $uri URI object or string.
221 221 * @param array $options Request options to apply.
222 222 */
223 - public function deleteAsync($uri, array $options = []): PromiseInterface
223 + public function deleteAsync($uri, array $options = []) : PromiseInterface
224 224 {
225 225 return $this->requestAsync('DELETE', $uri, $options);
226 226 }
227 227 }