8000 code fixes · Olajide/symfony@e97af0b · GitHub
[go: up one dir, main page]

Skip to content

Commit e97af0b

Browse files
committed
code fixes
1 parent df94282 commit e97af0b

File tree

2 files changed

+20
-17
lines changed

2 files changed

+20
-17
lines changed

src/Symfony/Bundle/FrameworkBundle/Command/ConfigDumpCommand.php

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,8 @@
1212
namespace Symfony\Bundle\FrameworkBundle\Command;
1313

1414
use Symfony\Component\Console\Input\InputArgument;
15-
use Symfony\Component\Console\Input\InputOption;
1615
use Symfony\Component\Console\Input\InputInterface;
1716
use Symfony\Component\Console\Output\OutputInterface;
18-
use Symfony\Component\Console\Output\Output;
19-
use Symfony\Component\HttpKernel\Bundle\Bundle;
2017
use Symfony\Component\Config\Definition\NodeInterface;
2118
use Symfony\Component\Config\Definition\ArrayNode;
2219
use Symfony\Component\Config\Definition\PrototypedArrayNode;
@@ -86,7 +83,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
8683
foreach ($kernel->getBundles() as $bundle) {
8784
$extension = $bundle->getContainerExtension();
8885

89-
if ($extension && ($extension->getAlias() == $name)) {
86+
if ($extension && $extension->getAlias() === $name) {
9087
break;
9188
}
9289

@@ -143,11 +140,8 @@ private function outputArray(array $array, $depth)
143140

144141
if ($is_indexed) {
145142
$this->outputLine('- '.$val, $depth * 4);
146-
147143
} else {
148-
$text = sprintf('%-20s %s', $key.':', $val);
149-
$this->outputLine($text, $depth * 4);
150-
144+
$this->outputLine(sprintf('%-20s %s', $key.':', $val), $depth * 4);
151145
}
152146

153147
if (is_array($value)) {

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ private function addFormSection(ArrayNodeDefinition $rootNode)
7272
{
7373
$rootNode
7474
->children()
75-
->arrayNode('form')->setInfo('form configuration')
75+
->arrayNode('form')
76+
->setInfo('form configuration')
7677
->canBeUnset()
7778
->treatNullLike(array('enabled' => true))
7879
->treatTrueLike(array('enabled' => true))
@@ -97,7 +98,8 @@ private function addEsiSection(ArrayNodeDefinition $rootNode)
9798
{
9899
$rootNode
99100
->children()
100-
->arrayNode('esi')->setInfo('esi configuration')
101+
->arrayNode('esi')
102+
->setInfo('esi configuration')
101103
->canBeUnset()
102104
->treatNullLike(array('enabled' => true))
103105
->treatTrueLike(array('enabled' => true))
@@ -113,7 +115,8 @@ private function addProfilerSection(ArrayNodeDefinition $rootNode)
113115
{
114116
$rootNode
115117
->children()
116-
->arrayNode('profiler')->setInfo('profiler configuration')
118+
->arrayNode('profiler')
119+
->setInfo('profiler configuration')
117120
->canBeUnset()
118121
->children()
119122
->booleanNode('only_exceptions')->defaultFalse()->end()
@@ -141,7 +144,8 @@ private function addRouterSection(ArrayNodeDefinition $rootNode)
141144
{
142145
$rootNode
143146
->children()
144-
->arrayNode('router')->setInfo('router configuration')
147+
->arrayNode('router')
148+
->setInfo('router configuration')
145149
->canBeUnset()
146150
->children()
147151
->scalarNode('resource')->isRequired()->end()
@@ -158,7 +162,8 @@ private function addSessionSection(ArrayNodeDefinition $rootNode)
158162
{
159163
$rootNode
160164
->children()
161-
->arrayNode('session')->setInfo('session configuration')
165+
->arrayNode('session')
166+
->setInfo('session configuration')
162167
->canBeUnset()
163168
->children()
164169
->booleanNode('auto_start')->defaultFalse()->end()
@@ -200,7 +205,8 @@ private function addTemplatingSection(ArrayNodeDefinition $rootNode)
200205

201206
$rootNode
202207
->children()
203-
->arrayNode('templating')->setInfo('templating configuration')
208+
->arrayNode('templating')
209+
->setInfo('templating configuration')
204210
->canBeUnset()
205211
->children()
206212
->scalarNode('assets_version')->defaultValue(null)->end()
@@ -314,7 +320,8 @@ private function addTranslatorSection(ArrayNodeDefinition $rootNode)
314320
{
315321
$rootNode
316322
->children()
317-
->arrayNode('translator')->setInfo('translator configuration')
323+
->arrayNode('translator')
324+
->setInfo('translator configuration')
318325
->canBeUnset()
319326
->treatNullLike(array('enabled' => true))
320327
->treatTrueLike(array('enabled' => true))
@@ -331,7 +338,8 @@ private function addValidationSection(ArrayNodeDefinition $rootNode)
331338
{
332339
$rootNode
333340
->children()
334-
->arrayNode('validation')->setInfo('validation configuration')
341+
->arrayNode('validation')
342+
->setInfo('validation configuration')
335343
->canBeUnset()
336344
->treatNullLike(array('enabled' => true))
337345
->treatTrueLike(array('enabled' => true))
@@ -349,7 +357,8 @@ private function addAnnotationsSection(ArrayNodeDefinition $rootNode)
349357
{
350358
$rootNode
351359
->children()
352-
->arrayNode('annotations')->setInfo('annotation configuration')
360+
->arrayNode('annotations')
361+
->setInfo('annotation configuration')
353362
->addDefaultsIfNotSet()
354363
->children()
355364
->scalarNode('cache')->defaultValue('file')->end()

0 commit comments

Comments
 (0)
0