From ef3d92815bdb07281ee8cbd73b3e3f9e41bdc1a0 Mon Sep 17 00:00:00 2001 From: Florin Patan Date: Sun, 16 Dec 2012 14:02:54 +0200 Subject: [PATCH] Fixed most of the docblocks/unused namespaces --- Encoder/JsonDecode.php | 1 + Encoder/JsonEncode.php | 3 ++- Encoder/XmlEncoder.php | 2 ++ Serializer.php | 6 ++++++ 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Encoder/JsonDecode.php b/Encoder/JsonDecode.php index 3cbbd0330..7ed8039ee 100644 --- a/Encoder/JsonDecode.php +++ b/Encoder/JsonDecode.php @@ -44,6 +44,7 @@ public function getLastError() * Decodes a JSON string into PHP data * * @param string $data JSON + * @param string $format * * @return mixed */ diff --git a/Encoder/JsonEncode.php b/Encoder/JsonEncode.php index 8c5a34ba8..280b8a973 100644 --- a/Encoder/JsonEncode.php +++ b/Encoder/JsonEncode.php @@ -41,7 +41,8 @@ public function getLastError() /** * Encodes PHP data to a JSON string * - * @param mixed $data + * @param mixed $data + * @param string $format * * @return string */ diff --git a/Encoder/XmlEncoder.php b/Encoder/XmlEncoder.php index 27c900593..11de50af0 100644 --- a/Encoder/XmlEncoder.php +++ b/Encoder/XmlEncoder.php @@ -271,6 +271,8 @@ private function parseXml($node) * @param array|object $data data * * @return Boolean + * + * @throws UnexpectedValueException */ private function buildXml($parentNode, $data) { diff --git a/Serializer.php b/Serializer.php index 5bdeeada2..cad6963b1 100644 --- a/Serializer.php +++ b/Serializer.php @@ -222,6 +222,9 @@ final public function decode($data, $format) * @param string $format format name, present to give the option to normalizers to act differently based on formats * * @return array|scalar + * + * @throws LogicException + * @throws UnexpectedValueException */ private function normalizeObject($object, $format = null) { @@ -253,6 +256,9 @@ private function normalizeObject($object, $format = null) * @param string $format format name, present to give the option to normalizers to act differently based on formats * * @return object + * + * @throws LogicException + * @throws UnexpectedValueException */ private function denormalizeObject($data, $class, $format = null) {