diff options
| author | manzerbredes <loic.guegan_secondary@yahoo.fr> | 2016-03-28 12:17:43 +0200 |
|---|---|---|
| committer | manzerbredes <loic.guegan_secondary@yahoo.fr> | 2016-03-28 12:17:43 +0200 |
| commit | 53f65de9d4163c9c095f2b8e87baca648c3645bd (patch) | |
| tree | 37f167f38b25aa50bd7dd1429438c0245a280a28 /server/vendor/php-opencloud/common/src/Common/Transport/Utils.php | |
| parent | 60cfe3ebc039df8d6a468a43a59e7fd8c2a16956 (diff) | |
| parent | 804fa322d841d73ee7592885ec500dc94e91b9e6 (diff) | |
Test
Diffstat (limited to 'server/vendor/php-opencloud/common/src/Common/Transport/Utils.php')
| -rwxr-xr-x | server/vendor/php-opencloud/common/src/Common/Transport/Utils.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/server/vendor/php-opencloud/common/src/Common/Transport/Utils.php b/server/vendor/php-opencloud/common/src/Common/Transport/Utils.php index c2a2dc1..ffac9ce 100755 --- a/server/vendor/php-opencloud/common/src/Common/Transport/Utils.php +++ b/server/vendor/php-opencloud/common/src/Common/Transport/Utils.php @@ -1,4 +1,4 @@ -<?php +<?php declare(strict_types=1); namespace OpenCloud\Common\Transport; @@ -8,7 +8,7 @@ use Psr\Http\Message\UriInterface; class Utils { - public static function jsonDecode(ResponseInterface $response, $assoc = true) + public static function jsonDecode(ResponseInterface $response, bool $assoc = true) { $jsonErrors = [ JSON_ERROR_DEPTH => 'JSON_ERROR_DEPTH - Maximum stack depth exceeded', @@ -40,11 +40,11 @@ class Utils * Method for flattening a nested array. * * @param array $data The nested array - * @param null $key The key to extract + * @param string $key The key to extract * * @return array */ - public static function flattenJson($data, $key = null) + public static function flattenJson($data, string $key = null) { return (!empty($data) && $key && isset($data[$key])) ? $data[$key] : $data; } @@ -59,7 +59,7 @@ class Utils * * @return string */ - public static function normalizeUrl($url) + public static function normalizeUrl(string $url): string { if (strpos($url, 'http') === false) { $url = 'http://' . $url; @@ -76,12 +76,12 @@ class Utils * * @return UriInterface */ - public static function addPaths(UriInterface $uri, ...$paths) + public static function addPaths(UriInterface $uri, ...$paths): UriInterface { return uri_for(rtrim((string) $uri, '/') . '/' . implode('/', $paths)); } - public static function appendPath(UriInterface $uri, $path) + public static function appendPath(UriInterface $uri, $path): UriInterface { return uri_for(rtrim((string) $uri, '/') . '/' . $path); } |
