[Serializer] fixed CS

This commit is contained in:
Fabien Potencier 2013-04-21 10:13:22 +02:00
parent 8e8e3772dc
commit d604af19ef
2 changed files with 22 additions and 16 deletions

View File

@ -19,14 +19,15 @@ namespace Symfony\Component\Serializer\Encoder;
interface DecoderInterface interface DecoderInterface
{ {
/** /**
* Decodes a string into PHP data * Decodes a string into PHP data.
* *
* @param scalar $data Data to decode * @param scalar $data Data to decode
* @param string $format Format name * @param string $format Format name
* @param array $context options that decoders have access to. * @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. * The format parameter specifies which format the data is in; valid values
* Authors implementing this interface are encouraged to document which formats they support in a non-inherited * depend on the specific implementation. Authors implementing this interface
* are encouraged to document which formats they support in a non-inherited
* phpdoc comment. * phpdoc comment.
* *
* @return mixed * @return mixed
@ -34,7 +35,7 @@ interface DecoderInterface
public function decode($data, $format, array $context = array()); 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 * @param string $format format name
* *

View File

@ -19,14 +19,16 @@ namespace Symfony\Component\Serializer\Encoder;
class JsonDecode implements DecoderInterface class JsonDecode implements DecoderInterface
{ {
/** /**
* Specifies if the returned result should be an associative array or a nested stdClass object hierarchy * Specifies if the returned result should be an associative array or a nested stdClass object hierarchy.
* @var bool *
* @var Boolean
*/ */
private $associative; private $associative;
/** /**
* Specifies the recursion depth * Specifies the recursion depth.
* @var int *
* @var integer
*/ */
private $recursionDepth; private $recursionDepth;
@ -36,8 +38,8 @@ class JsonDecode implements DecoderInterface
/** /**
* Constructs a new JsonDecode instance. * Constructs a new JsonDecode instance.
* *
* @param bool $associative True to return the result associative array, false for a nested stdClass hierarchy. * @param Boolean $associative True to return the result associative array, false for a nested stdClass hierarchy
* @param int $depth Specifies the recursion depth * @param integer $depth Specifies the recursion depth
*/ */
public function __construct($associative = false, $depth = 512) 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 * @return integer
* *
@ -58,9 +60,11 @@ class JsonDecode implements DecoderInterface
} }
/** /**
* @param string $data The encoded JSON string to decode * Decodes data.
* @param string $format Must be set to JsonEncoder::FORMAT *
* @param array $context An optional set of options for the JSON decoder; see below. * @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: * 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 * If not specified, this method will use the default set in JsonDecode::__construct
* *
* json_decode_options: integer * 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 * @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 * @param array $context
*
* @return array * @return array
*/ */
private function resolveContext(array $context) private function resolveContext(array $context)