Skip to content

Commit 699c735

Browse files
GrahamCampbellfabpot
authored andcommitted
[2.3] CS And DocBlock Fixes
1 parent 4209ac0 commit 699c735

25 files changed

+49
-46
lines changed

Encoder/ChainDecoder.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ public function supportsDecoding($format)
5858
* @param string $format
5959
*
6060
* @return DecoderInterface
61+
*
6162
* @throws RuntimeException if no decoder is found
6263
*/
6364
private function getDecoder($format)

Encoder/ChainEncoder.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ public function needsNormalization($format)
8080
* @param string $format
8181
*
8282
* @return EncoderInterface
83+
*
8384
* @throws RuntimeException if no encoder is found
8485
*/
8586
private function getEncoder($format)

Encoder/DecoderInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
namespace Symfony\Component\Serializer\Encoder;
1313

1414
/**
15-
* Defines the interface of decoders
15+
* Defines the interface of decoders.
1616
*
1717
* @author Jordi Boggiano <[email protected]>
1818
*/

Encoder/EncoderInterface.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@
1212
namespace Symfony\Component\Serializer\Encoder;
1313

1414
/**
15-
* Defines the interface of encoders
15+
* Defines the interface of encoders.
1616
*
1717
* @author Jordi Boggiano <[email protected]>
1818
*/
1919
interface EncoderInterface
2020
{
2121
/**
22-
* Encodes data into the given format
22+
* Encodes data into the given format.
2323
*
2424
* @param mixed $data Data to encode
2525
* @param string $format Format name
@@ -30,7 +30,7 @@ interface EncoderInterface
3030
public function encode($data, $format, array $context = array());
3131

3232
/**
33-
* Checks whether the serializer can encode to given format
33+
* Checks whether the serializer can encode to given format.
3434
*
3535
* @param string $format format name
3636
*

Encoder/JsonDecode.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
namespace Symfony\Component\Serializer\Encoder;
1313

1414
/**
15-
* Decodes JSON data
15+
* Decodes JSON data.
1616
*
1717
* @author Sander Coolen <[email protected]>
1818
*/

Encoder/JsonEncode.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
namespace Symfony\Component\Serializer\Encoder;
1313

1414
/**
15-
* Encodes JSON data
15+
* Encodes JSON data.
1616
*
1717
* @author Sander Coolen <[email protected]>
1818
*/
@@ -27,7 +27,7 @@ public function __construct($bitmask = 0)
2727
}
2828

2929
/**
30-
* Returns the last encoding error (if any)
30+
* Returns the last encoding error (if any).
3131
*
3232
* @return int
3333
*
@@ -39,7 +39,7 @@ public function getLastError()
3939
}
4040

4141
/**
42-
* Encodes PHP data to a JSON string
42+
* Encodes PHP data to a JSON string.
4343
*
4444
* {@inheritdoc}
4545
*/

Encoder/JsonEncoder.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
namespace Symfony\Component\Serializer\Encoder;
1313

1414
/**
15-
* Encodes JSON data
15+
* Encodes JSON data.
1616
*
1717
* @author Jordi Boggiano <[email protected]>
1818
*/
@@ -37,7 +37,7 @@ public function __construct(JsonEncode $encodingImpl = null, JsonDecode $decodin
3737
}
3838

3939
/**
40-
* Returns the last encoding error (if any)
40+
* Returns the last encoding error (if any).
4141
*
4242
* @return int
4343
*/
@@ -47,7 +47,7 @@ public function getLastEncodingError()
4747
}
4848

4949
/**
50-
* Returns the last decoding error (if any)
50+
* Returns the last decoding error (if any).
5151
*
5252
* @return int
5353
*/

Encoder/NormalizationAwareInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
namespace Symfony\Component\Serializer\Encoder;
1313

1414
/**
15-
* Defines the interface of encoders that will normalize data themselves
15+
* Defines the interface of encoders that will normalize data themselves.
1616
*
1717
* Implementing this interface essentially just tells the Serializer that the
1818
* data should not be pre-normalized before being passed to this Encoder.

Encoder/SerializerAwareEncoder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
use Symfony\Component\Serializer\SerializerAwareInterface;
1616

1717
/**
18-
* SerializerAware Encoder implementation
18+
* SerializerAware Encoder implementation.
1919
*
2020
* @author Jordi Boggiano <[email protected]>
2121
*/

Encoder/XmlEncoder.php

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
use Symfony\Component\Serializer\Exception\UnexpectedValueException;
1515

1616
/**
17-
* Encodes XML data
17+
* Encodes XML data.
1818
*
1919
* @author Jordi Boggiano <[email protected]>
2020
* @author John Wards <[email protected]>
@@ -115,7 +115,7 @@ public function decode($data, $format, array $context = array())
115115
}
116116

117117
/**
118-
* Checks whether the serializer can encode to given format
118+
* Checks whether the serializer can encode to given format.
119119
*
120120
* @param string $format format name
121121
*
@@ -127,7 +127,7 @@ public function supportsEncoding($format)
127127
}
128128

129129
/**
130-
* Checks whether the serializer can decode from given format
130+
* Checks whether the serializer can decode from given format.
131131
*
132132
* @param string $format format name
133133
*
@@ -139,7 +139,7 @@ public function supportsDecoding($format)
139139
}
140140

141141
/**
142-
* Sets the root node name
142+
* Sets the root node name.
143143
*
144144
* @param string $name root node name
145145
*/
@@ -149,7 +149,8 @@ public function setRootNodeName($name)
149149
}
150150

151151
/**
152-
* Returns the root node name
152+
* Returns the root node name.
153+
*
153154
* @return string
154155
*/
155156
public function getRootNodeName()
@@ -222,7 +223,7 @@ final protected function appendDocumentFragment($node, $fragment)
222223
}
223224

224225
/**
225-
* Checks the name is a valid xml element name
226+
* Checks the name is a valid xml element name.
226227
*
227228
* @param string $name
228229
*
@@ -287,7 +288,7 @@ private function parseXml($node)
287288
}
288289

289290
/**
290-
* Parse the data and convert it to DOMElements
291+
* Parse the data and convert it to DOMElements.
291292
*
292293
* @param DOMNode $parentNode
293294
* @param array|object $data data
@@ -316,7 +317,7 @@ private function buildXml($parentNode, $data, $xmlRootNodeName = null)
316317
/**
317318
* Create nodes to append to $parentNode based on the $key of this array
318319
* Produces <xml><item>0</item><item>1</item></xml>
319-
* From array("item" => array(0,1));
320+
* From array("item" => array(0,1));.
320321
*/
321322
foreach ($data as $subData) {
322323
$append = $this->appendNode($parentNode, $subData, $key);
@@ -392,7 +393,7 @@ private function needsCdataWrapping($val)
392393
}
393394

394395
/**
395-
* Tests the value being passed and decide what sort of element to create
396+
* Tests the value being passed and decide what sort of element to create.
396397
*
397398
* @param DOMNode $node
398399
* @param mixed $val

Exception/Exception.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
namespace Symfony\Component\Serializer\Exception;
1313

1414
/**
15-
* Base exception
15+
* Base exception.
1616
*
1717
* @author Johannes M. Schmitt <[email protected]>
1818
*/

Exception/InvalidArgumentException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
namespace Symfony\Component\Serializer\Exception;
1313

1414
/**
15-
* InvalidArgumentException
15+
* InvalidArgumentException.
1616
*
1717
* @author Johannes M. Schmitt <[email protected]>
1818
*/

Exception/LogicException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
namespace Symfony\Component\Serializer\Exception;
1313

1414
/**
15-
* LogicException
15+
* LogicException.
1616
*
1717
* @author Lukas Kahwe Smith <[email protected]>
1818
*/

Exception/RuntimeException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
namespace Symfony\Component\Serializer\Exception;
1313

1414
/**
15-
* RuntimeException
15+
* RuntimeException.
1616
*
1717
* @author Johannes M. Schmitt <[email protected]>
1818
*/

Exception/UnexpectedValueException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
namespace Symfony\Component\Serializer\Exception;
1313

1414
/**
15-
* UnexpectedValueException
15+
* UnexpectedValueException.
1616
*
1717
* @author Lukas Kahwe Smith <[email protected]>
1818
*/

Exception/UnsupportedException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
namespace Symfony\Component\Serializer\Exception;
1313

1414
/**
15-
* UnsupportedException
15+
* UnsupportedException.
1616
*
1717
* @author Johannes M. Schmitt <[email protected]>
1818
*/

Normalizer/DenormalizableInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
namespace Symfony\Component\Serializer\Normalizer;
1313

1414
/**
15-
* Defines the most basic interface a class must implement to be denormalizable
15+
* Defines the most basic interface a class must implement to be denormalizable.
1616
*
1717
* If a denormalizer is registered for the class and it doesn't implement
1818
* the Denormalizable interfaces, the normalizer will be used instead

Normalizer/DenormalizerInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
interface DenormalizerInterface
2020
{
2121
/**
22-
* Denormalizes data back into an object of the given class
22+
* Denormalizes data back into an object of the given class.
2323
*
2424
* @param mixed $data data to restore
2525
* @param string $class the expected class to instantiate
@@ -31,7 +31,7 @@ interface DenormalizerInterface
3131
public function denormalize($data, $class, $format = null, array $context = array());
3232

3333
/**
34-
* Checks whether the given class is supported for denormalization by this normalizer
34+
* Checks whether the given class is supported for denormalization by this normalizer.
3535
*
3636
* @param mixed $data Data to denormalize from.
3737
* @param string $type The class to which the data should be denormalized.

Normalizer/GetSetMethodNormalizer.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class GetSetMethodNormalizer extends SerializerAwareNormalizer implements Normal
4141
protected $camelizedAttributes = array();
4242

4343
/**
44-
* Set normalization callbacks
44+
* Set normalization callbacks.
4545
*
4646
* @param array $callbacks help normalize the result
4747
*
@@ -58,7 +58,7 @@ public function setCallbacks(array $callbacks)
5858
}
5959

6060
/**
61-
* Set ignored attributes for normalization
61+
* Set ignored attributes for normalization.
6262
*
6363
* @param array $ignoredAttributes
6464
*/
@@ -68,7 +68,7 @@ public function setIgnoredAttributes(array $ignoredAttributes)
6868
}
6969

7070
/**
71-
* Set attributes to be camelized on denormalize
71+
* Set attributes to be camelized on denormalize.
7272
*
7373
* @param array $camelizedAttributes
7474
*/
@@ -170,7 +170,7 @@ public function denormalize($data, $class, $format = null, array $context = arra
170170
/**
171171
* Format attribute name to access parameters or methods
172172
* As option, if attribute name is found on camelizedAttributes array
173-
* returns attribute name in camelcase format
173+
* returns attribute name in camelcase format.
174174
*
175175
* @param string $attributeName
176176
*

Normalizer/NormalizableInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
namespace Symfony\Component\Serializer\Normalizer;
1313

1414
/**
15-
* Defines the most basic interface a class must implement to be normalizable
15+
* Defines the most basic interface a class must implement to be normalizable.
1616
*
1717
* If a normalizer is registered for the class and it doesn't implement
1818
* the Normalizable interfaces, the normalizer will be used instead

Normalizer/NormalizerInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
interface NormalizerInterface
2020
{
2121
/**
22-
* Normalizes an object into a set of arrays/scalars
22+
* Normalizes an object into a set of arrays/scalars.
2323
*
2424
* @param object $object object to normalize
2525
* @param string $format format the normalization result will be encoded as
@@ -30,7 +30,7 @@ interface NormalizerInterface
3030
public function normalize($object, $format = null, array $context = array());
3131

3232
/**
33-
* Checks whether the given class is supported for normalization by this normalizer
33+
* Checks whether the given class is supported for normalization by this normalizer.
3434
*
3535
* @param mixed $data Data to normalize.
3636
* @param string $format The format being (de-)serialized from or into.

Normalizer/SerializerAwareNormalizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
use Symfony\Component\Serializer\SerializerAwareInterface;
1616

1717
/**
18-
* SerializerAware Normalizer implementation
18+
* SerializerAware Normalizer implementation.
1919
*
2020
* @author Jordi Boggiano <[email protected]>
2121
*/

Serializer.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
use Symfony\Component\Serializer\Exception\UnexpectedValueException;
2323

2424
/**
25-
* Serializer serializes and deserializes data
25+
* Serializer serializes and deserializes data.
2626
*
2727
* objects are turned into arrays by normalizers
2828
* arrays are turned into various output formats by encoders
@@ -212,7 +212,7 @@ final public function decode($data, $format, array $context = array())
212212
}
213213

214214
/**
215-
* Normalizes an object into a set of arrays/scalars
215+
* Normalizes an object into a set of arrays/scalars.
216216
*
217217
* @param object $object object to normalize
218218
* @param string $format format name, present to give the option to normalizers to act differently based on formats
@@ -247,7 +247,7 @@ private function normalizeObject($object, $format = null, array $context = array
247247
}
248248

249249
/**
250-
* Denormalizes data back into an object of the given class
250+
* Denormalizes data back into an object of the given class.
251251
*
252252
* @param mixed $data data to restore
253253
* @param string $class the expected class to instantiate

0 commit comments

Comments
 (0)