[Serializer] fixed CS (refs #7971)

This commit is contained in:
Fabien Potencier 2013-05-08 10:39:40 +02:00
parent a5ab1aa3f7
commit e3187590c0
4 changed files with 33 additions and 40 deletions

View File

@ -173,9 +173,7 @@ class Serializer implements SerializerInterface, NormalizerInterface, Denormaliz
private function getNormalizer($data, $format = null)
{
foreach ($this->normalizers as $normalizer) {
if ($normalizer instanceof NormalizerInterface
&& $normalizer->supportsNormalization($data, $format)
) {
if ($normalizer instanceof NormalizerInterface && $normalizer->supportsNormalization($data, $format)) {
return $normalizer;
}
}
@ -189,9 +187,7 @@ class Serializer implements SerializerInterface, NormalizerInterface, Denormaliz
private function getDenormalizer($data, $type, $format = null)
{
foreach ($this->normalizers as $normalizer) {
if ($normalizer instanceof DenormalizerInterface
&& $normalizer->supportsDenormalization($data, $type, $format)
) {
if ($normalizer instanceof DenormalizerInterface && $normalizer->supportsDenormalization($data, $type, $format)) {
return $normalizer;
}
}

View File

@ -25,7 +25,6 @@ class TestDenormalizer implements DenormalizerInterface
*/
public function denormalize($data, $class, $format = null, array $context = array())
{
}
/**
@ -33,6 +32,6 @@ class TestDenormalizer implements DenormalizerInterface
*/
public function supportsDenormalization($data, $type, $format = null)
{
return TRUE;
return true;
}
}

View File

@ -25,7 +25,6 @@ class TestNormalizer implements NormalizerInterface
*/
public function normalize($object, $format = null, array $context = array())
{
}
/**
@ -33,6 +32,6 @@ class TestNormalizer implements NormalizerInterface
*/
public function supportsNormalization($data, $format = null)
{
return TRUE;
return true;
}
}

View File

@ -244,5 +244,4 @@ class Model
{
return array('title' => $this->title, 'numbers' => $this->numbers);
}
}