diff options
author | Daniel Kesselberg <mail@danielkesselberg.de> | 2024-08-23 15:10:27 +0200 |
---|---|---|
committer | Daniel Kesselberg <mail@danielkesselberg.de> | 2024-08-25 19:34:58 +0200 |
commit | af6de04e9e141466dc229e444ff3f146f4a34765 (patch) | |
tree | 7b93f521865cdecdadb33637dea33bea242e7969 /lib/private/Http/Client/Client.php | |
parent | 1cc6b3577fdbeadece7e4e6478e7f7755555b41a (diff) | |
download | nextcloud-server-af6de04e9e141466dc229e444ff3f146f4a34765.tar.gz nextcloud-server-af6de04e9e141466dc229e444ff3f146f4a34765.zip |
style: update codestyle for coding-standard 1.2.3
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
Diffstat (limited to 'lib/private/Http/Client/Client.php')
-rw-r--r-- | lib/private/Http/Client/Client.php | 568 |
1 files changed, 284 insertions, 284 deletions
diff --git a/lib/private/Http/Client/Client.php b/lib/private/Http/Client/Client.php index 7cadf3fdf6e..0b72522c218 100644 --- a/lib/private/Http/Client/Client.php +++ b/lib/private/Http/Client/Client.php @@ -176,27 +176,27 @@ class Client implements IClient { * * @param string $uri * @param array $options Array such as - * 'query' => [ - * 'field' => 'abc', - * 'other_field' => '123', - * 'file_name' => fopen('/path/to/file', 'r'), - * ], - * 'headers' => [ - * 'foo' => 'bar', - * ], - * 'cookies' => [ - * 'foo' => 'bar', - * ], - * 'allow_redirects' => [ - * 'max' => 10, // allow at most 10 redirects. - * 'strict' => true, // use "strict" RFC compliant redirects. - * 'referer' => true, // add a Referer header - * 'protocols' => ['https'] // only allow https URLs - * ], - * 'sink' => '/path/to/file', // save to a file or a stream - * 'verify' => true, // bool or string to CA file - * 'debug' => true, - * 'timeout' => 5, + * 'query' => [ + * 'field' => 'abc', + * 'other_field' => '123', + * 'file_name' => fopen('/path/to/file', 'r'), + * ], + * 'headers' => [ + * 'foo' => 'bar', + * ], + * 'cookies' => [ + * 'foo' => 'bar', + * ], + * 'allow_redirects' => [ + * 'max' => 10, // allow at most 10 redirects. + * 'strict' => true, // use "strict" RFC compliant redirects. + * 'referer' => true, // add a Referer header + * 'protocols' => ['https'] // only allow https URLs + * ], + * 'sink' => '/path/to/file', // save to a file or a stream + * 'verify' => true, // bool or string to CA file + * 'debug' => true, + * 'timeout' => 5, * @return IResponse * @throws \Exception If the request could not get completed */ @@ -212,22 +212,22 @@ class Client implements IClient { * * @param string $uri * @param array $options Array such as - * 'headers' => [ - * 'foo' => 'bar', - * ], - * 'cookies' => [ - * 'foo' => 'bar', - * ], - * 'allow_redirects' => [ - * 'max' => 10, // allow at most 10 redirects. - * 'strict' => true, // use "strict" RFC compliant redirects. - * 'referer' => true, // add a Referer header - * 'protocols' => ['https'] // only allow https URLs - * ], - * 'sink' => '/path/to/file', // save to a file or a stream - * 'verify' => true, // bool or string to CA file - * 'debug' => true, - * 'timeout' => 5, + * 'headers' => [ + * 'foo' => 'bar', + * ], + * 'cookies' => [ + * 'foo' => 'bar', + * ], + * 'allow_redirects' => [ + * 'max' => 10, // allow at most 10 redirects. + * 'strict' => true, // use "strict" RFC compliant redirects. + * 'referer' => true, // add a Referer header + * 'protocols' => ['https'] // only allow https URLs + * ], + * 'sink' => '/path/to/file', // save to a file or a stream + * 'verify' => true, // bool or string to CA file + * 'debug' => true, + * 'timeout' => 5, * @return IResponse * @throws \Exception If the request could not get completed */ @@ -242,27 +242,27 @@ class Client implements IClient { * * @param string $uri * @param array $options Array such as - * 'body' => [ - * 'field' => 'abc', - * 'other_field' => '123', - * 'file_name' => fopen('/path/to/file', 'r'), - * ], - * 'headers' => [ - * 'foo' => 'bar', - * ], - * 'cookies' => [ - * 'foo' => 'bar', - * ], - * 'allow_redirects' => [ - * 'max' => 10, // allow at most 10 redirects. - * 'strict' => true, // use "strict" RFC compliant redirects. - * 'referer' => true, // add a Referer header - * 'protocols' => ['https'] // only allow https URLs - * ], - * 'sink' => '/path/to/file', // save to a file or a stream - * 'verify' => true, // bool or string to CA file - * 'debug' => true, - * 'timeout' => 5, + * 'body' => [ + * 'field' => 'abc', + * 'other_field' => '123', + * 'file_name' => fopen('/path/to/file', 'r'), + * ], + * 'headers' => [ + * 'foo' => 'bar', + * ], + * 'cookies' => [ + * 'foo' => 'bar', + * ], + * 'allow_redirects' => [ + * 'max' => 10, // allow at most 10 redirects. + * 'strict' => true, // use "strict" RFC compliant redirects. + * 'referer' => true, // add a Referer header + * 'protocols' => ['https'] // only allow https URLs + * ], + * 'sink' => '/path/to/file', // save to a file or a stream + * 'verify' => true, // bool or string to CA file + * 'debug' => true, + * 'timeout' => 5, * @return IResponse * @throws \Exception If the request could not get completed */ @@ -283,27 +283,27 @@ class Client implements IClient { * * @param string $uri * @param array $options Array such as - * 'body' => [ - * 'field' => 'abc', - * 'other_field' => '123', - * 'file_name' => fopen('/path/to/file', 'r'), - * ], - * 'headers' => [ - * 'foo' => 'bar', - * ], - * 'cookies' => [ - * 'foo' => 'bar', - * ], - * 'allow_redirects' => [ - * 'max' => 10, // allow at most 10 redirects. - * 'strict' => true, // use "strict" RFC compliant redirects. - * 'referer' => true, // add a Referer header - * 'protocols' => ['https'] // only allow https URLs - * ], - * 'sink' => '/path/to/file', // save to a file or a stream - * 'verify' => true, // bool or string to CA file - * 'debug' => true, - * 'timeout' => 5, + * 'body' => [ + * 'field' => 'abc', + * 'other_field' => '123', + * 'file_name' => fopen('/path/to/file', 'r'), + * ], + * 'headers' => [ + * 'foo' => 'bar', + * ], + * 'cookies' => [ + * 'foo' => 'bar', + * ], + * 'allow_redirects' => [ + * 'max' => 10, // allow at most 10 redirects. + * 'strict' => true, // use "strict" RFC compliant redirects. + * 'referer' => true, // add a Referer header + * 'protocols' => ['https'] // only allow https URLs + * ], + * 'sink' => '/path/to/file', // save to a file or a stream + * 'verify' => true, // bool or string to CA file + * 'debug' => true, + * 'timeout' => 5, * @return IResponse * @throws \Exception If the request could not get completed */ @@ -318,27 +318,27 @@ class Client implements IClient { * * @param string $uri * @param array $options Array such as - * 'body' => [ - * 'field' => 'abc', - * 'other_field' => '123', - * 'file_name' => fopen('/path/to/file', 'r'), - * ], - * 'headers' => [ - * 'foo' => 'bar', - * ], - * 'cookies' => [ - * 'foo' => 'bar', - * ], - * 'allow_redirects' => [ - * 'max' => 10, // allow at most 10 redirects. - * 'strict' => true, // use "strict" RFC compliant redirects. - * 'referer' => true, // add a Referer header - * 'protocols' => ['https'] // only allow https URLs - * ], - * 'sink' => '/path/to/file', // save to a file or a stream - * 'verify' => true, // bool or string to CA file - * 'debug' => true, - * 'timeout' => 5, + * 'body' => [ + * 'field' => 'abc', + * 'other_field' => '123', + * 'file_name' => fopen('/path/to/file', 'r'), + * ], + * 'headers' => [ + * 'foo' => 'bar', + * ], + * 'cookies' => [ + * 'foo' => 'bar', + * ], + * 'allow_redirects' => [ + * 'max' => 10, // allow at most 10 redirects. + * 'strict' => true, // use "strict" RFC compliant redirects. + * 'referer' => true, // add a Referer header + * 'protocols' => ['https'] // only allow https URLs + * ], + * 'sink' => '/path/to/file', // save to a file or a stream + * 'verify' => true, // bool or string to CA file + * 'debug' => true, + * 'timeout' => 5, * @return IResponse * @throws \Exception If the request could not get completed */ @@ -353,27 +353,27 @@ class Client implements IClient { * * @param string $uri * @param array $options Array such as - * 'body' => [ - * 'field' => 'abc', - * 'other_field' => '123', - * 'file_name' => fopen('/path/to/file', 'r'), - * ], - * 'headers' => [ - * 'foo' => 'bar', - * ], - * 'cookies' => [ - * 'foo' => 'bar', - * ], - * 'allow_redirects' => [ - * 'max' => 10, // allow at most 10 redirects. - * 'strict' => true, // use "strict" RFC compliant redirects. - * 'referer' => true, // add a Referer header - * 'protocols' => ['https'] // only allow https URLs - * ], - * 'sink' => '/path/to/file', // save to a file or a stream - * 'verify' => true, // bool or string to CA file - * 'debug' => true, - * 'timeout' => 5, + * 'body' => [ + * 'field' => 'abc', + * 'other_field' => '123', + * 'file_name' => fopen('/path/to/file', 'r'), + * ], + * 'headers' => [ + * 'foo' => 'bar', + * ], + * 'cookies' => [ + * 'foo' => 'bar', + * ], + * 'allow_redirects' => [ + * 'max' => 10, // allow at most 10 redirects. + * 'strict' => true, // use "strict" RFC compliant redirects. + * 'referer' => true, // add a Referer header + * 'protocols' => ['https'] // only allow https URLs + * ], + * 'sink' => '/path/to/file', // save to a file or a stream + * 'verify' => true, // bool or string to CA file + * 'debug' => true, + * 'timeout' => 5, * @return IResponse * @throws \Exception If the request could not get completed */ @@ -388,27 +388,27 @@ class Client implements IClient { * * @param string $uri * @param array $options Array such as - * 'body' => [ - * 'field' => 'abc', - * 'other_field' => '123', - * 'file_name' => fopen('/path/to/file', 'r'), - * ], - * 'headers' => [ - * 'foo' => 'bar', - * ], - * 'cookies' => [ - * 'foo' => 'bar', - * ], - * 'allow_redirects' => [ - * 'max' => 10, // allow at most 10 redirects. - * 'strict' => true, // use "strict" RFC compliant redirects. - * 'referer' => true, // add a Referer header - * 'protocols' => ['https'] // only allow https URLs - * ], - * 'sink' => '/path/to/file', // save to a file or a stream - * 'verify' => true, // bool or string to CA file - * 'debug' => true, - * 'timeout' => 5, + * 'body' => [ + * 'field' => 'abc', + * 'other_field' => '123', + * 'file_name' => fopen('/path/to/file', 'r'), + * ], + * 'headers' => [ + * 'foo' => 'bar', + * ], + * 'cookies' => [ + * 'foo' => 'bar', + * ], + * 'allow_redirects' => [ + * 'max' => 10, // allow at most 10 redirects. + * 'strict' => true, // use "strict" RFC compliant redirects. + * 'referer' => true, // add a Referer header + * 'protocols' => ['https'] // only allow https URLs + * ], + * 'sink' => '/path/to/file', // save to a file or a stream + * 'verify' => true, // bool or string to CA file + * 'debug' => true, + * 'timeout' => 5, * @return IResponse * @throws \Exception If the request could not get completed */ @@ -440,27 +440,27 @@ class Client implements IClient { * @param string $method The HTTP method to use * @param string $uri * @param array $options Array such as - * 'query' => [ - * 'field' => 'abc', - * 'other_field' => '123', - * 'file_name' => fopen('/path/to/file', 'r'), - * ], - * 'headers' => [ - * 'foo' => 'bar', - * ], - * 'cookies' => [ - * 'foo' => 'bar', - * ], - * 'allow_redirects' => [ - * 'max' => 10, // allow at most 10 redirects. - * 'strict' => true, // use "strict" RFC compliant redirects. - * 'referer' => true, // add a Referer header - * 'protocols' => ['https'] // only allow https URLs - * ], - * 'sink' => '/path/to/file', // save to a file or a stream - * 'verify' => true, // bool or string to CA file - * 'debug' => true, - * 'timeout' => 5, + * 'query' => [ + * 'field' => 'abc', + * 'other_field' => '123', + * 'file_name' => fopen('/path/to/file', 'r'), + * ], + * 'headers' => [ + * 'foo' => 'bar', + * ], + * 'cookies' => [ + * 'foo' => 'bar', + * ], + * 'allow_redirects' => [ + * 'max' => 10, // allow at most 10 redirects. + * 'strict' => true, // use "strict" RFC compliant redirects. + * 'referer' => true, // add a Referer header + * 'protocols' => ['https'] // only allow https URLs + * ], + * 'sink' => '/path/to/file', // save to a file or a stream + * 'verify' => true, // bool or string to CA file + * 'debug' => true, + * 'timeout' => 5, * @return IResponse * @throws \Exception If the request could not get completed */ @@ -483,27 +483,27 @@ class Client implements IClient { * * @param string $uri * @param array $options Array such as - * 'query' => [ - * 'field' => 'abc', - * 'other_field' => '123', - * 'file_name' => fopen('/path/to/file', 'r'), - * ], - * 'headers' => [ - * 'foo' => 'bar', - * ], - * 'cookies' => [ - * 'foo' => 'bar', - * ], - * 'allow_redirects' => [ - * 'max' => 10, // allow at most 10 redirects. - * 'strict' => true, // use "strict" RFC compliant redirects. - * 'referer' => true, // add a Referer header - * 'protocols' => ['https'] // only allow https URLs - * ], - * 'sink' => '/path/to/file', // save to a file or a stream - * 'verify' => true, // bool or string to CA file - * 'debug' => true, - * 'timeout' => 5, + * 'query' => [ + * 'field' => 'abc', + * 'other_field' => '123', + * 'file_name' => fopen('/path/to/file', 'r'), + * ], + * 'headers' => [ + * 'foo' => 'bar', + * ], + * 'cookies' => [ + * 'foo' => 'bar', + * ], + * 'allow_redirects' => [ + * 'max' => 10, // allow at most 10 redirects. + * 'strict' => true, // use "strict" RFC compliant redirects. + * 'referer' => true, // add a Referer header + * 'protocols' => ['https'] // only allow https URLs + * ], + * 'sink' => '/path/to/file', // save to a file or a stream + * 'verify' => true, // bool or string to CA file + * 'debug' => true, + * 'timeout' => 5, * @return IPromise */ public function getAsync(string $uri, array $options = []): IPromise { @@ -517,22 +517,22 @@ class Client implements IClient { * * @param string $uri * @param array $options Array such as - * 'headers' => [ - * 'foo' => 'bar', - * ], - * 'cookies' => [ - * 'foo' => 'bar', - * ], - * 'allow_redirects' => [ - * 'max' => 10, // allow at most 10 redirects. - * 'strict' => true, // use "strict" RFC compliant redirects. - * 'referer' => true, // add a Referer header - * 'protocols' => ['https'] // only allow https URLs - * ], - * 'sink' => '/path/to/file', // save to a file or a stream - * 'verify' => true, // bool or string to CA file - * 'debug' => true, - * 'timeout' => 5, + * 'headers' => [ + * 'foo' => 'bar', + * ], + * 'cookies' => [ + * 'foo' => 'bar', + * ], + * 'allow_redirects' => [ + * 'max' => 10, // allow at most 10 redirects. + * 'strict' => true, // use "strict" RFC compliant redirects. + * 'referer' => true, // add a Referer header + * 'protocols' => ['https'] // only allow https URLs + * ], + * 'sink' => '/path/to/file', // save to a file or a stream + * 'verify' => true, // bool or string to CA file + * 'debug' => true, + * 'timeout' => 5, * @return IPromise */ public function headAsync(string $uri, array $options = []): IPromise { @@ -546,27 +546,27 @@ class Client implements IClient { * * @param string $uri * @param array $options Array such as - * 'body' => [ - * 'field' => 'abc', - * 'other_field' => '123', - * 'file_name' => fopen('/path/to/file', 'r'), - * ], - * 'headers' => [ - * 'foo' => 'bar', - * ], - * 'cookies' => [ - * 'foo' => 'bar', - * ], - * 'allow_redirects' => [ - * 'max' => 10, // allow at most 10 redirects. - * 'strict' => true, // use "strict" RFC compliant redirects. - * 'referer' => true, // add a Referer header - * 'protocols' => ['https'] // only allow https URLs - * ], - * 'sink' => '/path/to/file', // save to a file or a stream - * 'verify' => true, // bool or string to CA file - * 'debug' => true, - * 'timeout' => 5, + * 'body' => [ + * 'field' => 'abc', + * 'other_field' => '123', + * 'file_name' => fopen('/path/to/file', 'r'), + * ], + * 'headers' => [ + * 'foo' => 'bar', + * ], + * 'cookies' => [ + * 'foo' => 'bar', + * ], + * 'allow_redirects' => [ + * 'max' => 10, // allow at most 10 redirects. + * 'strict' => true, // use "strict" RFC compliant redirects. + * 'referer' => true, // add a Referer header + * 'protocols' => ['https'] // only allow https URLs + * ], + * 'sink' => '/path/to/file', // save to a file or a stream + * 'verify' => true, // bool or string to CA file + * 'debug' => true, + * 'timeout' => 5, * @return IPromise */ public function postAsync(string $uri, array $options = []): IPromise { @@ -585,27 +585,27 @@ class Client implements IClient { * * @param string $uri * @param array $options Array such as - * 'body' => [ - * 'field' => 'abc', - * 'other_field' => '123', - * 'file_name' => fopen('/path/to/file', 'r'), - * ], - * 'headers' => [ - * 'foo' => 'bar', - * ], - * 'cookies' => [ - * 'foo' => 'bar', - * ], - * 'allow_redirects' => [ - * 'max' => 10, // allow at most 10 redirects. - * 'strict' => true, // use "strict" RFC compliant redirects. - * 'referer' => true, // add a Referer header - * 'protocols' => ['https'] // only allow https URLs - * ], - * 'sink' => '/path/to/file', // save to a file or a stream - * 'verify' => true, // bool or string to CA file - * 'debug' => true, - * 'timeout' => 5, + * 'body' => [ + * 'field' => 'abc', + * 'other_field' => '123', + * 'file_name' => fopen('/path/to/file', 'r'), + * ], + * 'headers' => [ + * 'foo' => 'bar', + * ], + * 'cookies' => [ + * 'foo' => 'bar', + * ], + * 'allow_redirects' => [ + * 'max' => 10, // allow at most 10 redirects. + * 'strict' => true, // use "strict" RFC compliant redirects. + * 'referer' => true, // add a Referer header + * 'protocols' => ['https'] // only allow https URLs + * ], + * 'sink' => '/path/to/file', // save to a file or a stream + * 'verify' => true, // bool or string to CA file + * 'debug' => true, + * 'timeout' => 5, * @return IPromise */ public function putAsync(string $uri, array $options = []): IPromise { @@ -619,27 +619,27 @@ class Client implements IClient { * * @param string $uri * @param array $options Array such as - * 'body' => [ - * 'field' => 'abc', - * 'other_field' => '123', - * 'file_name' => fopen('/path/to/file', 'r'), - * ], - * 'headers' => [ - * 'foo' => 'bar', - * ], - * 'cookies' => [ - * 'foo' => 'bar', - * ], - * 'allow_redirects' => [ - * 'max' => 10, // allow at most 10 redirects. - * 'strict' => true, // use "strict" RFC compliant redirects. - * 'referer' => true, // add a Referer header - * 'protocols' => ['https'] // only allow https URLs - * ], - * 'sink' => '/path/to/file', // save to a file or a stream - * 'verify' => true, // bool or string to CA file - * 'debug' => true, - * 'timeout' => 5, + * 'body' => [ + * 'field' => 'abc', + * 'other_field' => '123', + * 'file_name' => fopen('/path/to/file', 'r'), + * ], + * 'headers' => [ + * 'foo' => 'bar', + * ], + * 'cookies' => [ + * 'foo' => 'bar', + * ], + * 'allow_redirects' => [ + * 'max' => 10, // allow at most 10 redirects. + * 'strict' => true, // use "strict" RFC compliant redirects. + * 'referer' => true, // add a Referer header + * 'protocols' => ['https'] // only allow https URLs + * ], + * 'sink' => '/path/to/file', // save to a file or a stream + * 'verify' => true, // bool or string to CA file + * 'debug' => true, + * 'timeout' => 5, * @return IPromise */ public function deleteAsync(string $uri, array $options = []): IPromise { @@ -653,27 +653,27 @@ class Client implements IClient { * * @param string $uri * @param array $options Array such as - * 'body' => [ - * 'field' => 'abc', - * 'other_field' => '123', - * 'file_name' => fopen('/path/to/file', 'r'), - * ], - * 'headers' => [ - * 'foo' => 'bar', - * ], - * 'cookies' => [ - * 'foo' => 'bar', - * ], - * 'allow_redirects' => [ - * 'max' => 10, // allow at most 10 redirects. - * 'strict' => true, // use "strict" RFC compliant redirects. - * 'referer' => true, // add a Referer header - * 'protocols' => ['https'] // only allow https URLs - * ], - * 'sink' => '/path/to/file', // save to a file or a stream - * 'verify' => true, // bool or string to CA file - * 'debug' => true, - * 'timeout' => 5, + * 'body' => [ + * 'field' => 'abc', + * 'other_field' => '123', + * 'file_name' => fopen('/path/to/file', 'r'), + * ], + * 'headers' => [ + * 'foo' => 'bar', + * ], + * 'cookies' => [ + * 'foo' => 'bar', + * ], + * 'allow_redirects' => [ + * 'max' => 10, // allow at most 10 redirects. + * 'strict' => true, // use "strict" RFC compliant redirects. + * 'referer' => true, // add a Referer header + * 'protocols' => ['https'] // only allow https URLs + * ], + * 'sink' => '/path/to/file', // save to a file or a stream + * 'verify' => true, // bool or string to CA file + * 'debug' => true, + * 'timeout' => 5, * @return IPromise */ public function optionsAsync(string $uri, array $options = []): IPromise { |