From 54ec6723deb44e325782afd366eeec01ee29ac55 Mon Sep 17 00:00:00 2001 From: EoleDev Date: Wed, 23 Mar 2016 15:30:47 +0100 Subject: Maj Library --- server/vendor/php-opencloud/common/src/Common/JsonPath.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'server/vendor/php-opencloud/common/src/Common/JsonPath.php') diff --git a/server/vendor/php-opencloud/common/src/Common/JsonPath.php b/server/vendor/php-opencloud/common/src/Common/JsonPath.php index 0a6372e..b1a7b34 100644 --- a/server/vendor/php-opencloud/common/src/Common/JsonPath.php +++ b/server/vendor/php-opencloud/common/src/Common/JsonPath.php @@ -1,4 +1,4 @@ -jsonStructure = $this->setPath($path, $value, $this->jsonStructure); } @@ -53,9 +53,10 @@ class JsonPath * @param $path * @param $value * @param $json + * * @return mixed */ - private function setPath($path, $value, $json) + private function setPath(string $path, $value, array $json): array { $nodes = explode('.', $path); $point = array_shift($nodes); @@ -87,9 +88,10 @@ class JsonPath * Get a path's value. If no path can be matched, NULL is returned. * * @param $path + * * @return mixed|null */ - public function get($path) + public function get(string $path) { return $this->getPath($path, $this->jsonStructure); } @@ -99,9 +101,10 @@ class JsonPath * * @param $path * @param $json + * * @return null */ - private function getPath($path, $json) + private function getPath(string $path, $json) { $nodes = explode('.', $path); $point = array_shift($nodes); -- cgit v1.2.3