diff options
| author | EoleDev <EoleDev@outlook.fr> | 2016-03-23 15:30:47 +0100 |
|---|---|---|
| committer | EoleDev <EoleDev@outlook.fr> | 2016-03-23 15:30:47 +0100 |
| commit | 54ec6723deb44e325782afd366eeec01ee29ac55 (patch) | |
| tree | 5431400d307754a02e6c40b35a40e6761d7dac0c /server/vendor/php-opencloud/common/src/Common/JsonSchema/Schema.php | |
| parent | 0dc17aa9efb987dcdf6f864f4110450bcc0c9003 (diff) | |
Maj Library
Diffstat (limited to 'server/vendor/php-opencloud/common/src/Common/JsonSchema/Schema.php')
| -rw-r--r-- | server/vendor/php-opencloud/common/src/Common/JsonSchema/Schema.php | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/server/vendor/php-opencloud/common/src/Common/JsonSchema/Schema.php b/server/vendor/php-opencloud/common/src/Common/JsonSchema/Schema.php index a1cd380..e1e3f65 100644 --- a/server/vendor/php-opencloud/common/src/Common/JsonSchema/Schema.php +++ b/server/vendor/php-opencloud/common/src/Common/JsonSchema/Schema.php @@ -1,4 +1,4 @@ -<?php +<?php declare(strict_types=1); namespace OpenCloud\Common\JsonSchema; @@ -6,7 +6,10 @@ use JsonSchema\Validator; class Schema { + /** @var object */ private $body; + + /** @var Validator */ private $validator; public function __construct($body, Validator $validator = null) @@ -15,7 +18,7 @@ class Schema $this->validator = $validator ?: new Validator(); } - public function getPropertyPaths() + public function getPropertyPaths(): array { $paths = []; @@ -26,7 +29,7 @@ class Schema return $paths; } - public function normalizeObject($subject, array $aliases) + public function normalizeObject($subject, array $aliases): \stdClass { $out = new \stdClass; @@ -49,17 +52,17 @@ class Schema $this->validator->check($data, $this->body); } - public function isValid() + public function isValid(): bool { return $this->validator->isValid(); } - public function getErrors() + public function getErrors(): array { return $this->validator->getErrors(); } - public function getErrorString() + public function getErrorString(): string { $msg = "Provided values do not validate. Errors:\n"; |
