Skip to content

Commit ac29d70

Browse files
committed
[Serializer] fixed CS
1 parent ce255ed commit ac29d70

File tree

2 files changed

+22
-16
lines changed

2 files changed

+22
-16
lines changed

Encoder/DecoderInterface.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,23 @@
1919
interface DecoderInterface
2020
{
2121
/**
22-
* Decodes a string into PHP data
22+
* Decodes a string into PHP data.
2323
*
2424
* @param scalar $data Data to decode
2525
* @param string $format Format name
2626
* @param array $context options that decoders have access to.
2727
*
28-
* The format parameter specifies which format the data is in; valid values depend on the specific implementation.
29-
* Authors implementing this interface are encouraged to document which formats they support in a non-inherited
28+
* The format parameter specifies which format the data is in; valid values
29+
* depend on the specific implementation. Authors implementing this interface
30+
* are encouraged to document which formats they support in a non-inherited
3031
* phpdoc comment.
3132
*
3233
* @return mixed
3334
*/
3435
public function decode($data, $format, array $context = array());
3536

3637
/**
37-
* Checks whether the deserializer can decode from given format
38+
* Checks whether the deserializer can decode from given format.
3839
*
3940
* @param string $format format name
4041
*

Encoder/JsonDecode.php

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,16 @@
1919
class JsonDecode implements DecoderInterface
2020
{
2121
/**
22-
* Specifies if the returned result should be an associative array or a nested stdClass object hierarchy
23-
* @var bool
22+
* Specifies if the returned result should be an associative array or a nested stdClass object hierarchy.
23+
*
24+
* @var Boolean
2425
*/
2526
private $associative;
2627

2728
/**
28-
* Specifies the recursion depth
29-
* @var int
29+
* Specifies the recursion depth.
30+
*
31+
* @var integer
3032
*/
3133
private $recursionDepth;
3234

@@ -36,8 +38,8 @@ class JsonDecode implements DecoderInterface
3638
/**
3739
* Constructs a new JsonDecode instance.
3840
*
39-
* @param bool $associative True to return the result associative array, false for a nested stdClass hierarchy.
40-
* @param int $depth Specifies the recursion depth
41+
* @param Boolean $associative True to return the result associative array, false for a nested stdClass hierarchy
42+
* @param integer $depth Specifies the recursion depth
4143
*/
4244
public function __construct($associative = false, $depth = 512)
4345
{
@@ -46,7 +48,7 @@ public function __construct($associative = false, $depth = 512)
4648
}
4749

4850
/**
49-
* Returns the last decoding error (if any)
51+
* Returns the last decoding error (if any).
5052
*
5153
* @return integer
5254
*
@@ -58,9 +60,11 @@ public function getLastError()
5860
}
5961

6062
/**
61-
* @param string $data The encoded JSON string to decode
62-
* @param string $format Must be set to JsonEncoder::FORMAT
63-
* @param array $context An optional set of options for the JSON decoder; see below.
63+
* Decodes data.
64+
*
65+
* @param string $data The encoded JSON string to decode
66+
* @param string $format Must be set to JsonEncoder::FORMAT
67+
* @param array $context An optional set of options for the JSON decoder; see below
6468
*
6569
* The $context array is a simple key=>value array, with the following supported keys:
6670
*
@@ -74,7 +78,7 @@ public function getLastError()
7478
* If not specified, this method will use the default set in JsonDecode::__construct
7579
*
7680
* json_decode_options: integer
77-
* Specifies additional options as per documentation for json_decode. Only supported with PHP 5.4.0 and higher.
81+
* Specifies additional options as per documentation for json_decode. Only supported with PHP 5.4.0 and higher
7882
*
7983
* @return mixed
8084
*
@@ -108,9 +112,10 @@ public function supportsDecoding($format)
108112
}
109113

110114
/**
111-
* Merge the default options of the Json Decoder with the passed context.
115+
* Merges the default options of the Json Decoder with the passed context.
112116
*
113117
* @param array $context
118+
*
114119
* @return array
115120
*/
116121
private function resolveContext(array $context)

0 commit comments

Comments
 (0)