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/JsonSerializer.php | |
| parent | 60cfe3ebc039df8d6a468a43a59e7fd8c2a16956 (diff) | |
| parent | 804fa322d841d73ee7592885ec500dc94e91b9e6 (diff) | |
Test
Diffstat (limited to 'server/vendor/php-opencloud/common/src/Common/Transport/JsonSerializer.php')
| -rwxr-xr-x | server/vendor/php-opencloud/common/src/Common/Transport/JsonSerializer.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/server/vendor/php-opencloud/common/src/Common/Transport/JsonSerializer.php b/server/vendor/php-opencloud/common/src/Common/Transport/JsonSerializer.php index 11b31d3..4d0b2e4 100755 --- a/server/vendor/php-opencloud/common/src/Common/Transport/JsonSerializer.php +++ b/server/vendor/php-opencloud/common/src/Common/Transport/JsonSerializer.php @@ -1,4 +1,4 @@ -<?php +<?php declare(strict_types=1); namespace OpenCloud\Common\Transport; @@ -22,7 +22,7 @@ class JsonSerializer * * @return array|mixed */ - private function stockValue(Parameter $param, $userValue, $json) + private function stockValue(Parameter $param, $userValue, array $json): array { $name = $param->getName(); if ($path = $param->getPath()) { @@ -46,7 +46,7 @@ class JsonSerializer * * @return array|mixed */ - private function stockArrayJson(Parameter $param, $userValue) + private function stockArrayJson(Parameter $param, array $userValue): array { $elems = []; foreach ($userValue as $item) { @@ -63,7 +63,7 @@ class JsonSerializer * * @return array */ - private function stockObjectJson(Parameter $param, $userValue) + private function stockObjectJson(Parameter $param, \stdClass $userValue): array { $object = []; foreach ($userValue as $key => $val) { @@ -82,12 +82,12 @@ class JsonSerializer * * @return array */ - public function stockJson(Parameter $param, $userValue, $json) + public function stockJson(Parameter $param, $userValue, array $json): array { if ($param->isArray()) { $userValue = $this->stockArrayJson($param, $userValue); } elseif ($param->isObject()) { - $userValue = $this->stockObjectJson($param, $userValue); + $userValue = $this->stockObjectJson($param, (object) $userValue); } // Populate the final value return $this->stockValue($param, $userValue, $json); |
