Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b2ddfa8

Browse files
committed
minor #12362 [2.5] Remove aligned '=>' and '=' (disquedur)
This PR was merged into the 2.5 branch. Discussion ---------- [2.5] Remove aligned '=>' and '=' | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | [#12284] | License | MIT PR for 2.3 branch : #12293 Commits ------- e638ccb Remove aligned '=>' and '='
2 parents b56c2b4 + e638ccb commit b2ddfa8

File tree

35 files changed

+167
-167
lines changed

35 files changed

+167
-167
lines changed

src/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -382,9 +382,9 @@ protected function loadCacheDriver($cacheName, $objectManagerName, array $cacheD
382382

383383
if (!isset($cacheDriver['namespace'])) {
384384
// generate a unique namespace for the given application
385-
$env = $container->getParameter('kernel.root_dir').$container->getParameter('kernel.environment');
386-
$hash = hash('sha256', $env);
387-
$namespace = 'sf2'.$this->getMappingResourceExtension().'_'.$objectManagerName.'_'.$hash;
385+
$env = $container->getParameter('kernel.root_dir').$container->getParameter('kernel.environment');
386+
$hash = hash('sha256', $env);
387+
$namespace = 'sf2'.$this->getMappingResourceExtension().'_'.$objectManagerName.'_'.$hash;
388388

389389
$cacheDriver['namespace'] = $namespace;
390390
}

src/Symfony/Bridge/Doctrine/Tests/DependencyInjection/DoctrineExtensionTest.php

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -70,21 +70,21 @@ public function providerBasicDrivers()
7070
*/
7171
public function testLoadBasicCacheDriver($class, array $config, array $expectedCalls = array())
7272
{
73-
$container = $this->createContainer();
74-
$cacheName = 'metadata_cache';
75-
$objectManager = array(
76-
'name' => 'default',
73+
$container = $this->createContainer();
74+
$cacheName = 'metadata_cache';
75+
$objectManager = array(
76+
'name' => 'default',
7777
'metadata_cache_driver' => $config,
7878
);
7979

8080
$this->invokeLoadCacheDriver($objectManager, $container, $cacheName);
8181

8282
$this->assertTrue($container->hasDefinition('doctrine.orm.default_metadata_cache'));
8383

84-
$definition = $container->getDefinition('doctrine.orm.default_metadata_cache');
85-
$defCalls = $definition->getMethodCalls();
84+
$definition = $container->getDefinition('doctrine.orm.default_metadata_cache');
85+
$defCalls = $definition->getMethodCalls();
8686
$expectedCalls[] = 'setNamespace';
87-
$actualCalls = array_map(function ($call) {
87+
$actualCalls = array_map(function ($call) {
8888
return $call[0];
8989
}, $defCalls);
9090

@@ -98,14 +98,14 @@ public function testLoadBasicCacheDriver($class, array $config, array $expectedC
9898

9999
public function testServiceCacheDriver()
100100
{
101-
$cacheName = 'metadata_cache';
102-
$container = $this->createContainer();
103-
$definition = new Definition('%doctrine.orm.cache.apc.class%');
104-
$objectManager = array(
105-
'name' => 'default',
101+
$cacheName = 'metadata_cache';
102+
$container = $this->createContainer();
103+
$definition = new Definition('%doctrine.orm.cache.apc.class%');
104+
$objectManager = array(
105+
'name' => 'default',
106106
'metadata_cache_driver' => array(
107107
'type' => 'service',
108-
'id' => 'service_driver',
108+
'id' => 'service_driver',
109109
),
110110
);
111111

@@ -122,10 +122,10 @@ public function testServiceCacheDriver()
122122
*/
123123
public function testUnrecognizedCacheDriverException()
124124
{
125-
$cacheName = 'metadata_cache';
126-
$container = $this->createContainer();
127-
$objectManager = array(
128-
'name' => 'default',
125+
$cacheName = 'metadata_cache';
126+
$container = $this->createContainer();
127+
$objectManager = array(
128+
'name' => 'default',
129129
'metadata_cache_driver' => array(
130130
'type' => 'unrecognized_type',
131131
),
@@ -151,12 +151,12 @@ protected function invokeLoadCacheDriver(array $objectManager, ContainerBuilder
151151
protected function createContainer(array $data = array())
152152
{
153153
return new ContainerBuilder(new ParameterBag(array_merge(array(
154-
'kernel.bundles' => array('FrameworkBundle' => 'Symfony\\Bundle\\FrameworkBundle\\FrameworkBundle'),
155-
'kernel.cache_dir' => __DIR__,
156-
'kernel.debug' => false,
154+
'kernel.bundles' => array('FrameworkBundle' => 'Symfony\\Bundle\\FrameworkBundle\\FrameworkBundle'),
155+
'kernel.cache_dir' => __DIR__,
156+
'kernel.debug' => false,
157157
'kernel.environment' => 'test',
158-
'kernel.name' => 'kernel',
159-
'kernel.root_dir' => __DIR__,
158+
'kernel.name' => 'kernel',
159+
'kernel.root_dir' => __DIR__,
160160
), $data)));
161161
}
162162
}

src/Symfony/Bridge/Monolog/Formatter/ConsoleFormatter.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,16 @@ public function format(array $record)
3030
{
3131
if ($record['level'] >= Logger::ERROR) {
3232
$record['start_tag'] = '<error>';
33-
$record['end_tag'] = '</error>';
33+
$record['end_tag'] = '</error>';
3434
} elseif ($record['level'] >= Logger::NOTICE) {
3535
$record['start_tag'] = '<comment>';
36-
$record['end_tag'] = '</comment>';
36+
$record['end_tag'] = '</comment>';
3737
} elseif ($record['level'] >= Logger::INFO) {
3838
$record['start_tag'] = '<info>';
39-
$record['end_tag'] = '</info>';
39+
$record['end_tag'] = '</info>';
4040
} else {
4141
$record['start_tag'] = '';
42-
$record['end_tag'] = '';
42+
$record['end_tag'] = '';
4343
}
4444

4545
return parent::format($record);

src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/JsonDescriptor.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -168,15 +168,15 @@ protected function getRouteData(Route $route)
168168
unset($requirements['_scheme'], $requirements['_method']);
169169

170170
return array(
171-
'path' => $route->getPath(),
172-
'host' => '' !== $route->getHost() ? $route->getHost() : 'ANY',
173-
'scheme' => $route->getSchemes() ? implode('|', $route->getSchemes()) : 'ANY',
174-
'method' => $route->getMethods() ? implode('|', $route->getMethods()) : 'ANY',
175-
'class' => get_class($route),
176-
'defaults' => $route->getDefaults(),
171+
'path' => $route->getPath(),
172+
'host' => '' !== $route->getHost() ? $route->getHost() : 'ANY',
173+
'scheme' => $route->getSchemes() ? implode('|', $route->getSchemes()) : 'ANY',
174+
'method' => $route->getMethods() ? implode('|', $route->getMethods()) : 'ANY',
175+
'class' => get_class($route),
176+
'defaults' => $route->getDefaults(),
177177
'requirements' => $requirements ?: 'NO CUSTOM',
178-
'options' => $route->getOptions(),
179-
'pathRegex' => $route->compile()->getRegex(),
178+
'options' => $route->getOptions(),
179+
'pathRegex' => $route->compile()->getRegex(),
180180
);
181181
}
182182

@@ -189,11 +189,11 @@ protected function getRouteData(Route $route)
189189
private function getContainerDefinitionData(Definition $definition, $omitTags = false)
190190
{
191191
$data = array(
192-
'class' => (string) $definition->getClass(),
193-
'scope' => $definition->getScope(),
194-
'public' => $definition->isPublic(),
192+
'class' => (string) $definition->getClass(),
193+
'scope' => $definition->getScope(),
194+
'public' => $definition->isPublic(),
195195
'synthetic' => $definition->isSynthetic(),
196-
'file' => $definition->getFile(),
196+
'file' => $definition->getFile(),
197197
);
198198

199199
if (!$omitTags) {
@@ -219,7 +219,7 @@ private function getContainerAliasData(Alias $alias)
219219
{
220220
return array(
221221
'service' => (string) $alias,
222-
'public' => $alias->isPublic(),
222+
'public' => $alias->isPublic(),
223223
);
224224
}
225225
}

src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/AbstractDescriptorTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,9 @@ private function getContainerBuilderDescriptionTestData(array $objects)
133133
{
134134
$variations = array(
135135
'services' => array('show_private' => true),
136-
'public' => array('show_private' => false),
137-
'tag1' => array('show_private' => true, 'tag' => 'tag1'),
138-
'tags' => array('group_by' => 'tags', 'show_private' => true),
136+
'public' => array('show_private' => false),
137+
'tag1' => array('show_private' => true, 'tag' => 'tag1'),
138+
'tags' => array('group_by' => 'tags', 'show_private' => true),
139139
);
140140

141141
$data = array();

src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/ObjectsProvider.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ public static function getContainerParameters()
5959
return array(
6060
'parameters_1' => new ParameterBag(array(
6161
'integer' => 12,
62-
'string' => 'Hello world!',
62+
'string' => 'Hello world!',
6363
'boolean' => true,
64-
'array' => array(12, 'Hello world!', true),
64+
'array' => array(12, 'Hello world!', true),
6565
)),
6666
);
6767
}

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,10 @@ protected static function getBundleDefaultConfig()
126126
'validation' => array(
127127
'enabled' => false,
128128
'enable_annotations' => false,
129-
'static_method' => array('loadValidatorMetadata'),
129+
'static_method' => array('loadValidatorMetadata'),
130130
'translation_domain' => 'validators',
131-
'strict_email' => false,
132-
'api' => version_compare(PHP_VERSION, '5.3.9', '<') ? '2.4' : '2.5-bc',
131+
'strict_email' => false,
132+
'api' => version_compare(PHP_VERSION, '5.3.9', '<') ? '2.4' : '2.5-bc',
133133
),
134134
'annotations' => array(
135135
'cache' => 'file',

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/validation_2_4_api.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
$container->loadFromExtension('framework', array(
44
'secret' => 's3cr3t',
55
'validation' => array(
6-
'enabled' => true,
7-
'api' => '2.4',
6+
'enabled' => true,
7+
'api' => '2.4',
88
),
99
));

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/validation_2_5_api.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
$container->loadFromExtension('framework', array(
44
'secret' => 's3cr3t',
55
'validation' => array(
6-
'enabled' => true,
7-
'api' => '2.5',
6+
'enabled' => true,
7+
'api' => '2.5',
88
),
99
));

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/validation_2_5_bc_api.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
$container->loadFromExtension('framework', array(
44
'secret' => 's3cr3t',
55
'validation' => array(
6-
'enabled' => true,
7-
'api' => '2.5-bc',
6+
'enabled' => true,
7+
'api' => '2.5-bc',
88
),
99
));

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/validation_auto_api.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
$container->loadFromExtension('framework', array(
44
'secret' => 's3cr3t',
55
'validation' => array(
6-
'enabled' => true,
7-
'api' => 'auto',
6+
'enabled' => true,
7+
'api' => 'auto',
88
),
99
));

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/validation_implicit_api.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
$container->loadFromExtension('framework', array(
44
'secret' => 's3cr3t',
55
'validation' => array(
6-
'enabled' => true,
6+
'enabled' => true,
77
),
88
));

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/validation_multiple_static_methods.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
$container->loadFromExtension('framework', array(
44
'secret' => 's3cr3t',
55
'validation' => array(
6-
'enabled' => true,
7-
'static_method' => array('loadFoo', 'loadBar'),
6+
'enabled' => true,
7+
'static_method' => array('loadFoo', 'loadBar'),
88
),
99
));

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/validation_no_static_method.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
$container->loadFromExtension('framework', array(
44
'secret' => 's3cr3t',
55
'validation' => array(
6-
'enabled' => true,
7-
'static_method' => false,
6+
'enabled' => true,
7+
'static_method' => false,
88
),
99
));

src/Symfony/Bundle/FrameworkBundle/Tests/Routing/RedirectableUrlMatcherTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,12 @@ public function testSchemeRedirect()
6767

6868
$this->assertEquals(array(
6969
'_controller' => 'Symfony\Bundle\FrameworkBundle\Controller\RedirectController::urlRedirectAction',
70-
'path' => '/foo',
71-
'permanent' => true,
72-
'scheme' => 'https',
73-
'httpPort' => $context->getHttpPort(),
74-
'httpsPort' => $context->getHttpsPort(),
75-
'_route' => 'foo',
70+
'path' => '/foo',
71+
'permanent' => true,
72+
'scheme' => 'https',
73+
'httpPort' => $context->getHttpPort(),
74+
'httpsPort' => $context->getHttpsPort(),
75+
'_route' => 'foo',
7676
),
7777
$matcher->match('/foo')
7878
);

src/Symfony/Bundle/FrameworkBundle/Tests/Templating/PhpEngineTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ public function testGetInvalidHelper()
6464
protected function getContainer()
6565
{
6666
$container = new Container();
67-
$session = new Session(new MockArraySessionStorage());
68-
$request = new Request();
69-
$stack = new RequestStack();
67+
$session = new Session(new MockArraySessionStorage());
68+
$request = new Request();
69+
$stack = new RequestStack();
7070
$stack->push($request);
7171

7272
$request->setSession($session);

src/Symfony/Bundle/FrameworkBundle/Translation/Translator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class Translator extends BaseTranslator
2626
protected $container;
2727
protected $options = array(
2828
'cache_dir' => null,
29-
'debug' => false,
29+
'debug' => false,
3030
);
3131
protected $loaderIds;
3232

src/Symfony/Component/Config/Definition/Dumper/XmlReferenceDumper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ private function writeNode(NodeInterface $node, $depth = 0, $root = false, $name
129129
// get attributes
130130

131131
// metadata
132-
$name = str_replace('_', '-', $child->getName());
132+
$name = str_replace('_', '-', $child->getName());
133133
$value = '%%%%not_defined%%%%'; // use a string which isn't used in the normal world
134134

135135
// comments

src/Symfony/Component/Console/Command/HelpCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
8383
$helper = new DescriptorHelper();
8484
$helper->describe($output, $this->command, array(
8585
'format' => $input->getOption('format'),
86-
'raw' => $input->getOption('raw'),
86+
'raw' => $input->getOption('raw'),
8787
));
8888

8989
$this->command = null;

src/Symfony/Component/Console/Command/ListCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ protected function execute(InputInterface $input, OutputInterface $output)
7474

7575
$helper = new DescriptorHelper();
7676
$helper->describe($output, $this->getApplication(), array(
77-
'format' => $input->getOption('format'),
78-
'raw_text' => $input->getOption('raw'),
77+
'format' => $input->getOption('format'),
78+
'raw_text' => $input->getOption('raw'),
7979
'namespace' => $input->getArgument('namespace'),
8080
));
8181
}

src/Symfony/Component/Console/Descriptor/JsonDescriptor.php

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,11 @@ private function writeData(array $data, array $options)
9797
private function getInputArgumentData(InputArgument $argument)
9898
{
9999
return array(
100-
'name' => $argument->getName(),
100+
'name' => $argument->getName(),
101101
'is_required' => $argument->isRequired(),
102-
'is_array' => $argument->isArray(),
102+
'is_array' => $argument->isArray(),
103103
'description' => $argument->getDescription(),
104-
'default' => $argument->getDefault(),
104+
'default' => $argument->getDefault(),
105105
);
106106
}
107107

@@ -113,13 +113,13 @@ private function getInputArgumentData(InputArgument $argument)
113113
private function getInputOptionData(InputOption $option)
114114
{
115115
return array(
116-
'name' => '--'.$option->getName(),
117-
'shortcut' => $option->getShortcut() ? '-'.implode('|-', explode('|', $option->getShortcut())) : '',
118-
'accept_value' => $option->acceptValue(),
116+
'name' => '--'.$option->getName(),
117+
'shortcut' => $option->getShortcut() ? '-'.implode('|-', explode('|', $option->getShortcut())) : '',
118+
'accept_value' => $option->acceptValue(),
119119
'is_value_required' => $option->isValueRequired(),
120-
'is_multiple' => $option->isArray(),
121-
'description' => $option->getDescription(),
122-
'default' => $option->getDefault(),
120+
'is_multiple' => $option->isArray(),
121+
'description' => $option->getDescription(),
122+
'default' => $option->getDefault(),
123123
);
124124
}
125125

@@ -154,12 +154,12 @@ private function getCommandData(Command $command)
154154
$command->mergeApplicationDefinition(false);
155155

156156
return array(
157-
'name' => $command->getName(),
158-
'usage' => $command->getSynopsis(),
157+
'name' => $command->getName(),
158+
'usage' => $command->getSynopsis(),
159159
'description' => $command->getDescription(),
160-
'help' => $command->getProcessedHelp(),
161-
'aliases' => $command->getAliases(),
162-
'definition' => $this->getInputDefinitionData($command->getNativeDefinition()),
160+
'help' => $command->getProcessedHelp(),
161+
'aliases' => $command->getAliases(),
162+
'definition' => $this->getInputDefinitionData($command->getNativeDefinition()),
163163
);
164164
}
165165
}

0 commit comments

Comments
 (0)