Skip to content

Commit 6de3b71

Browse files
committed
fixed CS (mainly method signatures)
1 parent 40e029e commit 6de3b71

10 files changed

+24
-30
lines changed

Encoder/DecoderInterface.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace Symfony\Component\Serializer\Encoder;
44

5-
65
/*
76
* This file is part of the Symfony framework.
87
*
@@ -27,5 +26,5 @@ interface DecoderInterface
2726
*
2827
* @return mixed
2928
*/
30-
function decode($data, $format);
29+
public function decode($data, $format);
3130
}

Encoder/EncoderInterface.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace Symfony\Component\Serializer\Encoder;
44

5-
65
/*
76
* This file is part of the Symfony framework.
87
*
@@ -27,5 +26,5 @@ interface EncoderInterface
2726
*
2827
* @return string
2928
*/
30-
function encode($data, $format);
29+
public function encode($data, $format);
3130
}

Encoder/JsonEncoder.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace Symfony\Component\Serializer\Encoder;
44

5-
65
/*
76
* This file is part of the Symfony framework.
87
*

Encoder/NormalizationAwareInterface.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace Symfony\Component\Serializer\Encoder;
44

5-
65
/*
76
* This file is part of the Symfony framework.
87
*

Normalizer/CustomNormalizer.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace Symfony\Component\Serializer\Normalizer;
44

5-
65
/*
76
* This file is part of the Symfony framework.
87
*

Normalizer/NormalizableInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ interface NormalizableInterface
3535
* based on different output formats.
3636
* @return array|scalar
3737
*/
38-
function normalize(SerializerInterface $serializer, $format = null);
38+
public function normalize(SerializerInterface $serializer, $format = null);
3939

4040
/**
4141
* Denormalizes the object back from an array of scalars|arrays.
@@ -49,5 +49,5 @@ function normalize(SerializerInterface $serializer, $format = null);
4949
* @param string|null $format The format is optionally given to be able to denormalize differently
5050
* based on different input formats.
5151
*/
52-
function denormalize(SerializerInterface $serializer, $data, $format = null);
52+
public function denormalize(SerializerInterface $serializer, $data, $format = null);
5353
}

Normalizer/NormalizerInterface.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace Symfony\Component\Serializer\Normalizer;
44

5-
65
/*
76
* This file is part of the Symfony framework.
87
*
@@ -26,7 +25,7 @@ interface NormalizerInterface
2625
* @param string $format format the normalization result will be encoded as
2726
* @return array|scalar
2827
*/
29-
function normalize($object, $format = null);
28+
public function normalize($object, $format = null);
3029

3130
/**
3231
* Denormalizes data back into an object of the given class
@@ -36,7 +35,7 @@ function normalize($object, $format = null);
3635
* @param string $format format the given data was extracted from
3736
* @return object
3837
*/
39-
function denormalize($data, $class, $format = null);
38+
public function denormalize($data, $class, $format = null);
4039

4140
/**
4241
* Checks whether the given class is supported for normalization by this normalizer
@@ -45,7 +44,7 @@ function denormalize($data, $class, $format = null);
4544
* @param string $format The format being (de-)serialized from or into.
4645
* @return Boolean
4746
*/
48-
function supportsNormalization($data, $format = null);
47+
public function supportsNormalization($data, $format = null);
4948

5049
/**
5150
* Checks whether the given class is supported for denormalization by this normalizer
@@ -55,5 +54,5 @@ function supportsNormalization($data, $format = null);
5554
* @param string $format The format being deserialized from.
5655
* @return Boolean
5756
*/
58-
function supportsDenormalization($data, $type, $format = null);
57+
public function supportsDenormalization($data, $type, $format = null);
5958
}

Serializer.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public function __construct(array $normalizers = array(), array $encoders = arra
5959
/**
6060
* {@inheritdoc}
6161
*/
62-
public final function serialize($data, $format)
62+
final public function serialize($data, $format)
6363
{
6464
if (!$this->supportsSerialization($format)) {
6565
throw new UnexpectedValueException('Serialization for the format '.$format.' is not supported');
@@ -77,7 +77,7 @@ public final function serialize($data, $format)
7777
/**
7878
* {@inheritdoc}
7979
*/
80-
public final function deserialize($data, $type, $format)
80+
final public function deserialize($data, $type, $format)
8181
{
8282
if (!$this->supportsDeserialization($format)) {
8383
throw new UnexpectedValueException('Deserialization for the format '.$format.' is not supported');
@@ -131,15 +131,15 @@ public function denormalize($data, $type, $format = null)
131131
/**
132132
* {@inheritdoc}
133133
*/
134-
public final function encode($data, $format)
134+
final public function encode($data, $format)
135135
{
136136
return $this->getEncoder($format)->encode($data, $format);
137137
}
138138

139139
/**
140140
* {@inheritdoc}
141141
*/
142-
public final function decode($data, $format)
142+
final public function decode($data, $format)
143143
{
144144
return $this->getEncoder($format)->decode($data, $format);
145145
}

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: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ interface SerializerInterface
2727
* @param string $format format name
2828
* @return string
2929
*/
30-
function serialize($data, $format);
30+
public function serialize($data, $format);
3131

3232
/**
3333
* Deserializes data into the given type.
@@ -36,7 +36,7 @@ function serialize($data, $format);
3636
* @param string $type
3737
* @param string $format
3838
*/
39-
function deserialize($data, $type, $format);
39+
public function deserialize($data, $type, $format);
4040

4141
/**
4242
* Normalizes any data into a set of arrays/scalars
@@ -45,7 +45,7 @@ function deserialize($data, $type, $format);
4545
* @param string $format format name, present to give the option to normalizers to act differently based on formats
4646
* @return array|scalar
4747
*/
48-
function normalize($data, $format = null);
48+
public function normalize($data, $format = null);
4949

5050
/**
5151
* Denormalizes data into the given type.
@@ -55,7 +55,7 @@ function normalize($data, $format = null);
5555
* @param string $format
5656
* @return mixed
5757
*/
58-
function denormalize($data, $type, $format = null);
58+
public function denormalize($data, $type, $format = null);
5959

6060
/**
6161
* Encodes data into the given format
@@ -64,7 +64,7 @@ function denormalize($data, $type, $format = null);
6464
* @param string $format format name
6565
* @return array|scalar
6666
*/
67-
function encode($data, $format);
67+
public function encode($data, $format);
6868

6969
/**
7070
* Decodes a string from the given format back into PHP data
@@ -73,44 +73,44 @@ function encode($data, $format);
7373
* @param string $format format name
7474
* @return mixed
7575
*/
76-
function decode($data, $format);
76+
public function decode($data, $format);
7777

7878
/**
7979
* Checks whether the serializer can serialize to given format
8080
*
8181
* @param string $format format name
8282
* @return Boolean
8383
*/
84-
function supportsSerialization($format);
84+
public function supportsSerialization($format);
8585

8686
/**
8787
* Checks whether the serializer can deserialize from given format
8888
*
8989
* @param string $format format name
9090
* @return Boolean
9191
*/
92-
function supportsDeserialization($format);
92+
public function supportsDeserialization($format);
9393

9494
/**
9595
* Checks whether the serializer can encode to given format
9696
*
9797
* @param string $format format name
9898
* @return Boolean
9999
*/
100-
function supportsEncoding($format);
100+
public function supportsEncoding($format);
101101

102102
/**
103103
* Checks whether the serializer can decode from given format
104104
*
105105
* @param string $format format name
106106
* @return Boolean
107107
*/
108-
function supportsDecoding($format);
108+
public function supportsDecoding($format);
109109

110110
/**
111111
* Get the encoder for the given format
112112
*
113113
* @return EncoderInterface
114114
*/
115-
function getEncoder($format);
115+
public function getEncoder($format);
116116
}

0 commit comments

Comments
 (0)