[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
{
/**
* 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
*

View File

@ -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)