Skip to content

Commit

Permalink
symfony#39102: thank you again fabbot.
Browse files Browse the repository at this point in the history
  • Loading branch information
Basster committed Dec 5, 2020
1 parent b2e2c86 commit 05baa14
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 12 deletions.
Expand Up @@ -46,9 +46,7 @@ private function decorateNormalizer(string $id, ContainerBuilder $container): vo
$normalizerClass = $normalizerDef->getClass();

if (!$normalizerRef = $container->getReflectionClass($normalizerClass)) {
throw new InvalidArgumentException(
sprintf('Class "%s" used for service "%s" cannot be found.', $normalizerClass, $id)
);
throw new InvalidArgumentException(sprintf('Class "%s" used for service "%s" cannot be found.', $normalizerClass, $id));
}

$isNormalizer = $normalizerRef->implementsInterface(NormalizerInterface::class);
Expand All @@ -66,9 +64,7 @@ private function decorateNormalizer(string $id, ContainerBuilder $container): vo
} elseif ($isDenormalizer) {
$decoratorClass = TraceableDenormalizer::class;
} else {
throw new RuntimeException(
sprintf('Normalizer with id %s neither implements NormalizerInterface nor DenormalizerInterface!', $id)
);
throw new RuntimeException(sprintf('Normalizer with id %s neither implements NormalizerInterface nor DenormalizerInterface!', $id));
}

$decoratorDef = (new Definition($decoratorClass))
Expand Down
Expand Up @@ -18,8 +18,7 @@
use Symfony\Component\Serializer\SerializerAwareInterface;
use Symfony\Component\Serializer\SerializerInterface;

abstract class AbstractTraceableNormalizer implements SerializerAwareInterface, DenormalizerAwareInterface,
NormalizerAwareInterface
abstract class AbstractTraceableNormalizer implements SerializerAwareInterface, DenormalizerAwareInterface, NormalizerAwareInterface
{
/**
* @var DenormalizerInterface|NormalizerInterface
Expand Down
Expand Up @@ -14,7 +14,6 @@
use Symfony\Component\Serializer\Normalizer\DenormalizerInterface;
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;

final class TraceableHybridNormalizer extends AbstractTraceableNormalizer implements NormalizerInterface,
DenormalizerInterface
final class TraceableHybridNormalizer extends AbstractTraceableNormalizer implements NormalizerInterface, DenormalizerInterface
{
}
Expand Up @@ -18,8 +18,7 @@
use Symfony\Component\Serializer\SerializerAwareInterface;
use Symfony\Component\Serializer\SerializerInterface;

final class TestSerializerNormalizerDenormalizerAware implements SerializerAwareInterface, DenormalizerAwareInterface,
NormalizerAwareInterface, NormalizerInterface
final class TestSerializerNormalizerDenormalizerAware implements SerializerAwareInterface, DenormalizerAwareInterface, NormalizerAwareInterface, NormalizerInterface
{
public $denormalizer;
public $serializer;
Expand Down

0 comments on commit 05baa14

Please sign in to comment.