8000 removed supports(De)Serializiation() · symfony/symfony@0776b50 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0776b50

Browse files
committed
removed supports(De)Serializiation()
1 parent 72b9083 commit 0776b50

File tree

2 files changed

+2
-34
lines changed

2 files changed

+2
-34
lines changed

src/Symfony/Component/Serializer/Serializer.php

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public function __construct(array $normalizers = array(), array $encoders = arra
6565
*/
6666
public final function serialize($data, $format)
6767
{
68-
if (!$this->supportsSerialization($format)) {
68+
if (!$this->supportsEncoding($format)) {
6969
throw new UnexpectedValueException('Serialization for the format '.$format.' is not supported');
7070
}
7171

@@ -83,7 +83,7 @@ public final function serialize($data, $format)
8383
*/
8484
public final function deserialize($data, $type, $format)
8585
{
86-
if (!$this->supportsDeserialization($format)) {
86+
if (!$this->supportsDecoding($format)) {
8787
throw new UnexpectedValueException('Deserialization for the format '.$format.' is not supported');
8888
}
8989

@@ -266,22 +266,6 @@ private function denormalizeObject($data, $class, $format = null)
266266
throw new UnexpectedValueException('Could not denormalize object of type '.$class.', no supporting normalizer found.');
267267
}
268268

269-
/**
270-
* {@inheritdoc}
271-
*/
272-
public function supportsSerialization($format)
273-
{
274-
return $this->supportsEncoding($format);
275-
}
276-
277-
/**
278-
* {@inheritdoc}
279-
*/
280-
public function supportsDeserialization($format)
281-
{
282-
return $this->supportsDecoding($format);
283-
}
284-
285269
/**
286270
* {@inheritdoc}
287271
*/

src/Symfony/Component/Serializer/SerializerInterface.php

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -37,20 +37,4 @@ function serialize($data, $format);
3737
* @param string $format
3838
*/
3939
function deserialize($data, $type, $format);
40-
41-
/**
42-
* Checks whether the serializer can serialize to given format
43-
*
44-
* @param string $format format name
45-
* @return Boolean
46-
*/
47-
function supportsSerialization($format);
48-
49-
/**
50-
* Checks whether the serializer can deserialize from given format
51-
*
52-
* @param string $format format name
53-
* @return Boolean
54-
*/
55-
function supportsDeserialization($format);
5640
}

0 commit comments

Comments
 (0)
0