From d604af19efbe5e24b88453929d4570254bf5c0b0 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sun, 21 Apr 2013 10:13:22 +0200 Subject: [PATCH] [Serializer] fixed CS --- .../Serializer/Encoder/DecoderInterface.php | 9 +++--- .../Serializer/Encoder/JsonDecode.php | 29 +++++++++++-------- 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/src/Symfony/Component/Serializer/Encoder/DecoderInterface.php b/src/Symfony/Component/Serializer/Encoder/DecoderInterface.php index b94ce35c6d..9dd336d5f7 100644 --- a/src/Symfony/Component/Serializer/Encoder/DecoderInterface.php +++ b/src/Symfony/Component/Serializer/Encoder/DecoderInterface.php @@ -19,14 +19,15 @@ namespace Symfony\Component\Serializer\Encoder; interface DecoderInterface { /** - * Decodes a string into PHP data + * Decodes a string into PHP data. * * @param scalar $data Data to decode * @param string $format Format name * @param array $context options that decoders have access to. * - * The format parameter specifies which format the data is in; valid values depend on the specific implementation. - * Authors implementing this interface are encouraged to document which formats they support in a non-inherited + * The format parameter specifies which format the data is in; valid values + * depend on the specific implementation. Authors implementing this interface + * are encouraged to document which formats they support in a non-inherited * phpdoc comment. * * @return mixed @@ -34,7 +35,7 @@ interface DecoderInterface public function decode($data, $format, array $context = array()); /** - * Checks whether the deserializer can decode from given format + * Checks whether the deserializer can decode from given format. * * @param string $format format name * diff --git a/src/Symfony/Component/Serializer/Encoder/JsonDecode.php b/src/Symfony/Component/Serializer/Encoder/JsonDecode.php index 72a72335ba..ca00aa3719 100644 --- a/src/Symfony/Component/Serializer/Encoder/JsonDecode.php +++ b/src/Symfony/Component/Serializer/Encoder/JsonDecode.php @@ -19,14 +19,16 @@ namespace Symfony\Component\Serializer\Encoder; class JsonDecode implements DecoderInterface { /** - * Specifies if the returned result should be an associative array or a nested stdClass object hierarchy - * @var bool + * Specifies if the returned result should be an associative array or a nested stdClass object hierarchy. + * + * @var Boolean */ private $associative; /** - * Specifies the recursion depth - * @var int + * Specifies the recursion depth. + * + * @var integer */ private $recursionDepth; @@ -36,8 +38,8 @@ class JsonDecode implements DecoderInterface /** * Constructs a new JsonDecode instance. * - * @param bool $associative True to return the result associative array, false for a nested stdClass hierarchy. - * @param int $depth Specifies the recursion depth + * @param Boolean $associative True to return the result associative array, false for a nested stdClass hierarchy + * @param integer $depth Specifies the recursion depth */ public function __construct($associative = false, $depth = 512) { @@ -46,7 +48,7 @@ class JsonDecode implements DecoderInterface } /** - * Returns the last decoding error (if any) + * Returns the last decoding error (if any). * * @return integer * @@ -58,9 +60,11 @@ class JsonDecode implements DecoderInterface } /** - * @param string $data The encoded JSON string to decode - * @param string $format Must be set to JsonEncoder::FORMAT - * @param array $context An optional set of options for the JSON decoder; see below. + * Decodes data. + * + * @param string $data The encoded JSON string to decode + * @param string $format Must be set to JsonEncoder::FORMAT + * @param array $context An optional set of options for the JSON decoder; see below * * The $context array is a simple key=>value array, with the following supported keys: * @@ -74,7 +78,7 @@ class JsonDecode implements DecoderInterface * If not specified, this method will use the default set in JsonDecode::__construct * * json_decode_options: integer - * Specifies additional options as per documentation for json_decode. Only supported with PHP 5.4.0 and higher. + * Specifies additional options as per documentation for json_decode. Only supported with PHP 5.4.0 and higher * * @return mixed * @@ -108,9 +112,10 @@ class JsonDecode implements DecoderInterface } /** - * Merge the default options of the Json Decoder with the passed context. + * Merges the default options of the Json Decoder with the passed context. * * @param array $context + * * @return array */ private function resolveContext(array $context)