Skip to content

Commit cf9b6a4

Browse files
committed
fixed CS
1 parent 2889319 commit cf9b6a4

10 files changed

+18
-18
lines changed

Encoder/DecoderInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ interface DecoderInterface
2626
*
2727
* @return mixed
2828
*/
29-
function decode($data, $format);
29+
public function decode($data, $format);
3030

3131
/**
3232
* Checks whether the serializer can decode from given format
3333
*
3434
* @param string $format format name
3535
* @return Boolean
3636
*/
37-
function supportsDecoding($format);
37+
public function supportsDecoding($format);
3838
}

Encoder/EncoderInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ interface EncoderInterface
2626
*
2727
* @return scalar
2828
*/
29-
function encode($data, $format);
29+
public function encode($data, $format);
3030

3131
/**
3232
* Checks whether the serializer can encode to given format
3333
*
3434
* @param string $format format name
3535
* @return Boolean
3636
*/
37-
function supportsEncoding($format);
37+
public function supportsEncoding($format);
3838
}

Normalizer/DenormalizableInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,5 @@ interface DenormalizableInterface
3333
* @param string|null $format The format is optionally given to be able to denormalize differently
3434
* based on different input formats.
3535
*/
36-
function denormalize(DenormalizerInterface $denormalizer, $data, $format = null);
36+
public function denormalize(DenormalizerInterface $denormalizer, $data, $format = null);
3737
}

Normalizer/DenormalizerInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ interface DenormalizerInterface
2626
* @param string $format format the given data was extracted from
2727
* @return object
2828
*/
29-
function denormalize($data, $class, $format = null);
29+
public function denormalize($data, $class, $format = null);
3030

3131
/**
3232
* Checks whether the given class is supported for denormalization by this normalizer
@@ -36,5 +36,5 @@ function denormalize($data, $class, $format = null);
3636
* @param string $format The format being deserialized from.
3737
* @return Boolean
3838
*/
39-
function supportsDenormalization($data, $type, $format = null);
39+
public function supportsDenormalization($data, $type, $format = null);
4040
}

Normalizer/NormalizableInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,5 @@ interface NormalizableInterface
3333
* based on different output formats.
3434
* @return array|scalar
3535
*/
36-
function normalize(NormalizerInterface $normalizer, $format = null);
36+
public function normalize(NormalizerInterface $normalizer, $format = null);
3737
}

Normalizer/NormalizerInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ interface NormalizerInterface
2525
* @param string $format format the normalization result will be encoded as
2626
* @return array|scalar
2727
*/
28-
function normalize($object, $format = null);
28+
public function normalize($object, $format = null);
2929

3030
/**
3131
* Checks whether the given class is supported for normalization by this normalizer
@@ -34,5 +34,5 @@ function normalize($object, $format = null);
3434
* @param string $format The format being (de-)serialized from or into.
3535
* @return Boolean
3636
*/
37-
function supportsNormalization($data, $format = null);
37+
public function supportsNormalization($data, $format = null);
3838
}

Serializer.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public function __construct(array $normalizers = array(), array $encoders = arra
6363
/**
6464
* {@inheritdoc}
6565
*/
66-
public final function serialize($data, $format)
66+
final public function serialize($data, $format)
6767
{
6868
if (!$this->supportsEncoding($format)) {
6969
throw new UnexpectedValueException('Serialization for the format '.$format.' is not supported');
@@ -81,7 +81,7 @@ public final function serialize($data, $format)
8181
/**
8282
* {@inheritdoc}
8383
*/
84-
public final function deserialize($data, $type, $format)
84+
final public function deserialize($data, $type, $format)
8585
{
8686
if (!$this->supportsDecoding($format)) {
8787
throw new UnexpectedValueException('Deserialization for the format '.$format.' is not supported');
@@ -195,15 +195,15 @@ private function getDenormalizer($data, $type, $format = null)
195195
/**
196196
* {@inheritdoc}
197197
*/
198-
public final function encode($data, $format)
198+
final public function encode($data, $format)
199199
{
200200
return $this->getEncoder($format)->encode($data, $format);
201201
}
202202

203203
/**
204204
* {@inheritdoc}
205205
*/
206-
public final function decode($data, $format)
206+
final public function decode($data, $format)
207207
{
208208
return $this->getEncoder($format)->decode($data, $format);
209209
}

SerializerAwareInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@ interface SerializerAwareInterface
2525
*
2626
* @param SerializerInterface $serializer
2727
*/
28-
function setSerializer(SerializerInterface $serializer);
28+
public function setSerializer(SerializerInterface $serializer);
2929
}

SerializerInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ interface SerializerInterface
2525
* @param string $format format name
2626
* @return string
2727
*/
28-
function serialize($data, $format);
28+
public function serialize($data, $format);
2929

3030
/**
3131
* Deserializes data into the given type.
@@ -34,5 +34,5 @@ function serialize($data, $format);
3434
* @param string $type
3535
* @param string $format
3636
*/
37-
function deserialize($data, $type, $format);
37+
public function deserialize($data, $type, $format);
3838
}

Tests/Fixtures/DenormalizableDummy.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
class DenormalizableDummy implements DenormalizableInterface
1818
{
1919

20-
function denormalize(DenormalizerInterface $denormalizer, $data, $format = null)
20+
public function denormalize(DenormalizerInterface $denormalizer, $data, $format = null)
2121
{
2222

2323
}

0 commit comments

Comments
 (0)