summaryrefslogtreecommitdiff
path: root/vendor/guzzlehttp/guzzle/src/Utils.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/guzzlehttp/guzzle/src/Utils.php')
-rw-r--r--vendor/guzzlehttp/guzzle/src/Utils.php22
1 files changed, 11 insertions, 11 deletions
diff --git a/vendor/guzzlehttp/guzzle/src/Utils.php b/vendor/guzzlehttp/guzzle/src/Utils.php
index e355f32..fcf571d 100644
--- a/vendor/guzzlehttp/guzzle/src/Utils.php
+++ b/vendor/guzzlehttp/guzzle/src/Utils.php
@@ -23,9 +23,9 @@ final class Utils
{
switch (\gettype($input)) {
case 'object':
- return 'object(' . \get_class($input) . ')';
+ return 'object('.\get_class($input).')';
case 'array':
- return 'array(' . \count($input) . ')';
+ return 'array('.\count($input).')';
default:
\ob_start();
\var_dump($input);
@@ -79,9 +79,9 @@ final class Utils
*
* The returned handler is not wrapped by any default middlewares.
*
- * @throws \RuntimeException if no viable Handler is available.
- *
* @return callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface Returns the best handler for the given system.
+ *
+ * @throws \RuntimeException if no viable Handler is available.
*/
public static function chooseHandler(): callable
{
@@ -247,8 +247,8 @@ EOT
}
// Special match if the area when prefixed with ".". Remove any
// existing leading "." and add a new leading ".".
- $area = '.' . \ltrim($area, '.');
- if (\substr($host, -(\strlen($area))) === $area) {
+ $area = '.'.\ltrim($area, '.');
+ if (\substr($host, -\strlen($area)) === $area) {
return true;
}
}
@@ -269,13 +269,13 @@ EOT
*
* @throws InvalidArgumentException if the JSON cannot be decoded.
*
- * @link https://www.php.net/manual/en/function.json-decode.php
+ * @see https://www.php.net/manual/en/function.json-decode.php
*/
public static function jsonDecode(string $json, bool $assoc = false, int $depth = 512, int $options = 0)
{
$data = \json_decode($json, $assoc, $depth, $options);
if (\JSON_ERROR_NONE !== \json_last_error()) {
- throw new InvalidArgumentException('json_decode error: ' . \json_last_error_msg());
+ throw new InvalidArgumentException('json_decode error: '.\json_last_error_msg());
}
return $data;
@@ -290,13 +290,13 @@ EOT
*
* @throws InvalidArgumentException if the JSON cannot be encoded.
*
- * @link https://www.php.net/manual/en/function.json-encode.php
+ * @see https://www.php.net/manual/en/function.json-encode.php
*/
public static function jsonEncode($value, int $options = 0, int $depth = 512): string
{
$json = \json_encode($value, $options, $depth);
if (\JSON_ERROR_NONE !== \json_last_error()) {
- throw new InvalidArgumentException('json_encode error: ' . \json_last_error_msg());
+ throw new InvalidArgumentException('json_encode error: '.\json_last_error_msg());
}
/** @var string */
@@ -341,7 +341,7 @@ EOT
$errorMessage = 'IDN conversion failed';
if ($errors) {
- $errorMessage .= ' (errors: ' . implode(', ', $errors) . ')';
+ $errorMessage .= ' (errors: '.implode(', ', $errors).')';
}
throw new InvalidArgumentException($errorMessage);