From e97af0bac02bd1948feeab36924675d32b14f810 Mon Sep 17 00:00:00 2001 From: Kevin Bond Date: Tue, 24 Jan 2012 15:51:23 -0500 Subject: [PATCH] code fixes --- .../Command/ConfigDumpCommand.php | 10 ++----- .../DependencyInjection/Configuration.php | 27 ++++++++++++------- 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/ConfigDumpCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/ConfigDumpCommand.php index c9a69c8a07..be45676853 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/ConfigDumpCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/ConfigDumpCommand.php @@ -12,11 +12,8 @@ namespace Symfony\Bundle\FrameworkBundle\Command; use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Output\Output; -use Symfony\Component\HttpKernel\Bundle\Bundle; use Symfony\Component\Config\Definition\NodeInterface; use Symfony\Component\Config\Definition\ArrayNode; use Symfony\Component\Config\Definition\PrototypedArrayNode; @@ -86,7 +83,7 @@ EOF foreach ($kernel->getBundles() as $bundle) { $extension = $bundle->getContainerExtension(); - if ($extension && ($extension->getAlias() == $name)) { + if ($extension && $extension->getAlias() === $name) { break; } @@ -143,11 +140,8 @@ EOF if ($is_indexed) { $this->outputLine('- '.$val, $depth * 4); - } else { - $text = sprintf('%-20s %s', $key.':', $val); - $this->outputLine($text, $depth * 4); - + $this->outputLine(sprintf('%-20s %s', $key.':', $val), $depth * 4); } if (is_array($value)) { diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php index b8cda65249..5195ff1c2f 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php @@ -72,7 +72,8 @@ class Configuration implements ConfigurationInterface { $rootNode ->children() - ->arrayNode('form')->setInfo('form configuration') + ->arrayNode('form') + ->setInfo('form configuration') ->canBeUnset() ->treatNullLike(array('enabled' => true)) ->treatTrueLike(array('enabled' => true)) @@ -97,7 +98,8 @@ class Configuration implements ConfigurationInterface { $rootNode ->children() - ->arrayNode('esi')->setInfo('esi configuration') + ->arrayNode('esi') + ->setInfo('esi configuration') ->canBeUnset() ->treatNullLike(array('enabled' => true)) ->treatTrueLike(array('enabled' => true)) @@ -113,7 +115,8 @@ class Configuration implements ConfigurationInterface { $rootNode ->children() - ->arrayNode('profiler')->setInfo('profiler configuration') + ->arrayNode('profiler') + ->setInfo('profiler configuration') ->canBeUnset() ->children() ->booleanNode('only_exceptions')->defaultFalse()->end() @@ -141,7 +144,8 @@ class Configuration implements ConfigurationInterface { $rootNode ->children() - ->arrayNode('router')->setInfo('router configuration') + ->arrayNode('router') + ->setInfo('router configuration') ->canBeUnset() ->children() ->scalarNode('resource')->isRequired()->end() @@ -158,7 +162,8 @@ class Configuration implements ConfigurationInterface { $rootNode ->children() - ->arrayNode('session')->setInfo('session configuration') + ->arrayNode('session') + ->setInfo('session configuration') ->canBeUnset() ->children() ->booleanNode('auto_start')->defaultFalse()->end() @@ -200,7 +205,8 @@ class Configuration implements ConfigurationInterface $rootNode ->children() - ->arrayNode('templating')->setInfo('templating configuration') + ->arrayNode('templating') + ->setInfo('templating configuration') ->canBeUnset() ->children() ->scalarNode('assets_version')->defaultValue(null)->end() @@ -314,7 +320,8 @@ class Configuration implements ConfigurationInterface { $rootNode ->children() - ->arrayNode('translator')->setInfo('translator configuration') + ->arrayNode('translator') + ->setInfo('translator configuration') ->canBeUnset() ->treatNullLike(array('enabled' => true)) ->treatTrueLike(array('enabled' => true)) @@ -331,7 +338,8 @@ class Configuration implements ConfigurationInterface { $rootNode ->children() - ->arrayNode('validation')->setInfo('validation configuration') + ->arrayNode('validation') + ->setInfo('validation configuration') ->canBeUnset() ->treatNullLike(array('enabled' => true)) ->treatTrueLike(array('enabled' => true)) @@ -349,7 +357,8 @@ class Configuration implements ConfigurationInterface { $rootNode ->children() - ->arrayNode('annotations')->setInfo('annotation configuration') + ->arrayNode('annotations') + ->setInfo('annotation configuration') ->addDefaultsIfNotSet() ->children() ->scalarNode('cache')->defaultValue('file')->end()