Skip to content

Commit

Permalink
psr code style
Browse files Browse the repository at this point in the history
  • Loading branch information
goetas committed May 17, 2017
1 parent d4046f5 commit 90373f0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
4 changes: 1 addition & 3 deletions DependencyInjection/JMSSerializerExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,7 @@ public function loadInternal(array $config, ContainerBuilder $container)
$container->setParameter('jms_serializer.xml_serialization_visitor.format_output', $config['visitors']['xml']['format_output']);
$container->setParameter('jms_serializer.json_serialization_visitor.options', $config['visitors']['json']['options']);



if ( ! $container->getParameter('kernel.debug')) {
if (!$container->getParameter('kernel.debug')) {
$container->removeDefinition('jms_serializer.stopwatch_subscriber');
}

Expand Down
14 changes: 7 additions & 7 deletions JMSSerializerBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,28 +18,28 @@

namespace JMS\SerializerBundle;

use JMS\SerializerBundle\DependencyInjection\Compiler\DoctrinePass;
use JMS\SerializerBundle\DependencyInjection\Compiler\TwigExtensionPass;
use Symfony\Component\DependencyInjection\Compiler\PassConfig;
use JMS\DiExtraBundle\DependencyInjection\Compiler\LazyServiceMapPass;
use JMS\SerializerBundle\DependencyInjection\Compiler\CustomHandlersPass;
use JMS\SerializerBundle\DependencyInjection\Compiler\DoctrinePass;
use JMS\SerializerBundle\DependencyInjection\Compiler\RegisterEventListenersAndSubscribersPass;
use JMS\SerializerBundle\DependencyInjection\Compiler\ServiceMapPass;
use JMS\SerializerBundle\DependencyInjection\Compiler\TwigExtensionPass;
use Symfony\Component\DependencyInjection\Compiler\PassConfig;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Bundle\Bundle;
use JMS\DiExtraBundle\DependencyInjection\Compiler\LazyServiceMapPass;
use Symfony\Component\DependencyInjection\Definition;
use Symfony\Component\HttpKernel\Bundle\Bundle;

class JMSSerializerBundle extends Bundle
{
public function build(ContainerBuilder $builder)
{
$builder->addCompilerPass($this->getServiceMapPass('jms_serializer.serialization_visitor', 'format',
function(ContainerBuilder $container, Definition $def) {
function (ContainerBuilder $container, Definition $def) {
$container->getDefinition('jms_serializer.serializer')->replaceArgument(3, $def);
}
));
$builder->addCompilerPass($this->getServiceMapPass('jms_serializer.deserialization_visitor', 'format',
function(ContainerBuilder $container, Definition $def) {
function (ContainerBuilder $container, Definition $def) {
$container->getDefinition('jms_serializer.serializer')->replaceArgument(4, $def);
}
));
Expand Down
2 changes: 1 addition & 1 deletion Tests/DependencyInjection/ConfigurationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public function testConfigComposed()
$directories = $container->getDefinition('jms_serializer.metadata.file_locator')->getArgument(0);

$this->assertArrayNotHasKey('JMSSerializerBundleNs1', $directories);
$this->assertEquals($ref->getPath().'/Resources/config', $directories['JMSSerializerBundleNs2']);
$this->assertEquals($ref->getPath() . '/Resources/config', $directories['JMSSerializerBundleNs2']);
}

public function testContextDefaults()
Expand Down

0 comments on commit 90373f0

Please sign in to comment.