8000 CS: apply rules · symfony/symfony@22d4e15 · GitHub
[go: up one dir, main page]

Skip to content

Commit 22d4e15

Browse files
keradusnicolas-grekas
authored andcommitted
CS: apply rules
1 parent 287713f commit 22d4e15

File tree

68 files changed

+185
-200
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+185
-200
lines changed

src/Symfony/Bridge/Doctrine/Form/Type/DoctrineType.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,6 @@ public function configureOptions(OptionsResolver $resolver)
138138
$type = $this;
139139

140140
$choiceLoader = function (Options $options) use ($choiceListFactory, &$choiceLoaders, $type) {
141-
142141
// Unless the choices are given explicitly, load them on demand
143142
if (null === $options['choices']) {
144143
$hash = null;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ protected function setUp()
4444
$this->extension->expects($this->any())
4545
->method('getObjectManagerElementName')
4646
->will($this->returnCallback(function ($name) {
47-
return 'doctrine.orm.'.$name;
47+
return 'doctrine.orm.'.$name;
4848
}));
4949
}
5050

src/Symfony/Bridge/Twig/Command/DebugCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ protected function configure()
6060
new InputOption('format', null, InputOption::VALUE_REQUIRED, 'The output format (text or json)', 'text'),
6161
))
6262
->setDescription('Shows a list of twig functions, filters, globals and tests')
63-
->setHelp(<<<EOF
63+
->setHelp(<<<'EOF'
6464
The <info>%command.name%</info> command outputs a list of twig functions,
6565
filters, globals and tests. Output can be filtered with an optional argument.
6666

src/Symfony/Bridge/Twig/Command/LintCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ protected function configure()
6161
->setDescription('Lints a template and outputs encountered errors')
6262
->addOption('format', null, InputOption::VALUE_REQUIRED, 'The output format', 'txt')
6363
->addArgument('filename', InputArgument::IS_ARRAY)
64-
->setHelp(<<<EOF
64+
->setHelp(<<<'EOF'
6565
The <info>%command.name%</info> command lints a template and outputs to STDOUT
6666
the first encountered syntax error.
6767

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ protected function configure()
3939
new InputArgument('name', InputArgument::OPTIONAL, 'The bundle name or the extension alias'),
4040
))
4141
->setDescription('Dumps the current configuration for an extension')
42-
->setHelp(<<<EOF
42+
->setHelp(<<<'EOF'
4343
The <info>%command.name%</info> command dumps the current configuration for an
4444
extension/bundle.
4545

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ protected function configure()
3838
new InputOption('raw', null, InputOption::VALUE_NONE, 'To output raw description'),
3939
))
4040
->setDescription('Displays configured listeners for an application')
41-
->setHelp(<<<EOF
41+
->setHelp(<<<'EOF'
4242
The <info>%command.name%</info> command displays all configured listeners:
4343
4444
<info>php %command.full_name%</info>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ protected function configure()
3939
))
4040
->setName('server:start')
4141
->setDescription('Starts PHP built-in web server in the background')
42-
->setHelp(<<<EOF
42+
->setHelp(<<<'EOF'
4343
The <info>%command.name%</info> runs PHP's built-in web server:
4444
4545
<info>php %command.full_name%</info>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ protected function configure()
3333
))
3434
->setName('server:stop')
3535
->setDescription('Stops PHP\'s built-in web server that was started with the server:start command')
36-
->setHelp(<<<EOF
36+
->setHelp(<<<'EOF'
3737
The <info>%command.name%</info> stops PHP's built-in web server:
3838
3939
<info>php %command.full_name%</info>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ protected function configure()
5050
new InputOption('only-unused', null, InputOption::VALUE_NONE, 'Displays only unused messages'),
5151
))
5252
->setDescription('Displays translation messages information')
53-
->setHelp(<<<EOF
53+
->setHelp(<<<'EOF'
5454
The <info>%command.name%</info> command helps finding unused or missing translation
5555
messages and comparing them with the fallback ones by inspecting the
5656
templates and translation files of a given bundle or the app folder.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ protected function configure()
3434
->setDescription('Lints a file and outputs encountered errors')
3535
->addArgument('filename', null, 'A file or a directory or STDIN')
3636
->addOption('format', null, InputOption::VALUE_REQUIRED, 'The output format', 'txt')
37-
->setHelp(<<<EOF
37+
->setHelp(<<<'EOF'
3838
The <info>%command.name%</info> command lints a YAML file and outputs to STDOUT
3939
the first encountered syntax error.
4040
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?php echo $view['form']->block($form, 'form_widget_simple', array('type' => isset($type) ? $type : 'text')) ?>
1+
<?php echo $view['form']->block($form, 'form_widget_simple', array('type' => isset($type) ? $type : 'text')) ?>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?php echo $view['form']->block($form, 'form_widget_simple', array('type' => isset($type) ? $type : 'password')) ?>
1+
<?php echo $view['form']->block($form, 'form_widget_simple', array('type' => isset($type) ? $type : 'password')) ?>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?php echo $view['form']->block($form, 'form_widget_simple', array('type' => isset($type) ? $type : 'text')) ?> %
1+
<?php echo $view['form']->block($form, 'form_widget_simple', array('type' => isset($type) ? $type : 'text')) ?> %
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?php echo $view['form']->block($form, 'button_widget', array('type' => isset($type) ? $type : 'reset')) ?>
1+
<?php echo $view['form']->block($form, 'button_widget', array('type' => isset($type) ? $type : 'reset')) ?>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?php echo $view['form']->block($form, 'form_widget_simple', array('type' => isset($type) ? $type : 'search')) ?>
1+
<?php echo $view['form']->block($form, 'form_widget_simple', array('type' => isset($type) ? $type : 'search')) ?>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?php echo $view['form']->block($form, 'button_widget', array('type' => isset($type) ? $type : 'submit')) ?>
1+
<?php echo $view['form']->block($form, 'button_widget', array('type' => isset($type) ? $type : 'submit')) ?>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?php echo $view['form']->block($form, 'form_widget_simple', array('type' => isset($type) ? $type : 'url')) ?>
1+
<?php echo $view['form']->block($form, 'form_widget_simple', array('type' => isset($type) ? $type : 'url')) ?>

src/Symfony/Bundle/FrameworkBundle/Routing/Router.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,6 @@ private function resolve($value)
164164
gettype($resolved)
165165
)
166166
);
167-
168167
}, $value);
169168

170169
return str_replace('%%', '%', $escapedValue);

src/Symfony/Bundle/FrameworkBundle/Tests/Command/RouterMatchCommandTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ private function getContainer()
8888
->will($this->returnValueMap(array(
8989
array('router', 1, $router),
9090
array('controller_name_converter', 1, $loader),
91-
9291
)));
9392

9493
return $container;

src/Symfony/Bundle/FrameworkBundle/Tests/Command/TranslationDebugCommandTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ private function getContainer($extractedMessages = array(), $loadedMessages = ar
136136
->method('extract')
137137
->will(
138138
$this->returnCallback(function ($path, $catalogue) use ($extractedMessages) {
139-
$catalogue->add($extractedMessages);
139+
$catalogue->add($extractedMessages);
140140
})
141141
);
142142

@@ -146,7 +146,7 @@ private function getContainer($extractedMessages = array(), $loadedMessages = ar
146146
->method('loadMessages')
147147
->will(
148148
$this->returnCallback(function ($path, $catalogue) use ($loadedMessages) {
149-
$catalogue->add($loadedMessages);
149+
$catalogue->add($loadedMessages);
150150
})
151151
);
152152

src/Symfony/Bundle/FrameworkBundle/Tests/Command/TranslationUpdateCommandTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ private function getContainer($extractedMessages = array(), $loadedMessages = ar
7474
->method('extract')
7575
->will(
7676
$this->returnCallback(function ($path, $catalogue) use ($extractedMessages) {
77-
$catalogue->add($extractedMessages);
77+
$catalogue->add($extractedMessages);
7878
})
7979
);
8080

@@ -84,7 +84,7 @@ private function getContainer($extractedMessages = array(), $loadedMessages = ar
8484
->method('loadMessages')
8585
->will(
8686
$this->returnCallback(function ($path, $catalogue) use ($loadedMessages) {
87-
$catalogue->add($loadedMessages);
87+
$catalogue->add($loadedMessages);
8888
})
8989
);
9090

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ public function getDescribeCallableTestData()
141141
}
142142

143143
abstract protected function getDescriptor();
144+
144145
abstract protected function getFormat();
145146

146147
private function assertDescription($expectedDescription, $describedObject, array $options = array())

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,11 @@ class CallableClass
191191
public function __invoke()
192192
{
193193
}
194+
194195
public static function staticMethod()
195196
{
196197
}
198+
197199
public function method()
198200
{
199201
}

src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Resources/views/translation.html.php

Lines changed: 1 addition & 1 deletion
3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
This template is used for translation message extraction tests
22
<?php echo $view['translator']->trans('single-quoted key') ?>
3
<?php echo $view['translator']->trans('double-quoted key') ?>
4-
<?php echo $view['translator']->trans(<<<EOF
4+
<?php echo $view['translator']->trans(<<<'EOF'
55
heredoc key
66
EOF
77
) ?>

src/Symfony/Bundle/SecurityBundle/DataCollector/SecurityDataCollector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public function collect(Request $request, Response $response, \Exception $except
8181
'authenticated' => $token->isAuthenticated(),
8282
'token_class' => get_class($token),
8383
'user' => $token->getUsername(),
84-
'roles' => array_map(function (RoleInterface $role) { return $role->getRole();}, $assignedRoles),
84+
'roles' => array_map(function (RoleInterface $role) { return $role->getRole(); }, $assignedRoles),
8585
'inherited_roles' => array_map(function (RoleInterface $role) { return $role->getRole(); }, $inheritedRoles),
8686
'supports_role_hierarchy' => null !== $this->roleHierarchy,
8787
);

src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/SecurityFactoryInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ interface SecurityFactoryInterface
2525
* Configures the container services required to use the authentication listener.
2626
*
2727
* @param ContainerBuilder $container
28-
* @param string $id The unique id of the firewall
28+
* @param string $id The unique id of the firewall
2929
* @param array $config The options array for the listener
3030
* @param string $userProvider The service id of the user provider
3131
* @param string $defaultEntryPoint
@@ -48,7 +48,7 @@ public function getPosition();
4848
/**
4949
* Defines the configuration key used to reference the provider
5050
* in the firewall configuration.
51-
*
51+
*
5252
* @return string
5353
*/
5454
pub 10000 lic function getKey();

src/Symfony/Bundle/TwigBundle/Tests/Controller/PreviewErrorControllerTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ public function testForwardRequestToConfiguredController()
3434
->method('handle')
3535
->with(
3636
$this->callback(function (Request $request) use ($self, $logicalControllerName, $code) {
37-
3837
$self->assertEquals($logicalControllerName, $request->attributes->get('_controller'));
3938

4039
$exception = $request->attributes->get('exception');

src/Symfony/Component/Config/Tests/Definition/Dumper/XmlReferenceDumperTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public function testNamespaceDumper()
3434

3535
private function getConfigurationAsString()
3636
{
37-
return str_replace("\n", PHP_EOL, <<<EOL
37+
return str_replace("\n", PHP_EOL, <<<'EOL'
3838
<!-- Namespace: http://example.org/schema/dic/acme_root -->
3939
<!-- scalar-required: Required -->
4040
<!-- enum-with-default: One of "this"; "that" -->

src/Symfony/Component/Console/Tests/Helper/LegacyTableHelperTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public function testRenderProvider()
112112
array('ISBN', 'Title', 'Author'),
113113
$books,
114114
TableHelper::LAYOUT_COMPACT,
115-
<<<TABLE
115+
<<<'TABLE'
116116
ISBN Title Author
117117
99921-58-10-7 Divine Comedy Dante Alighieri
118118
9971-5-0210-0 A Tale of Two Cities Charles Dickens
@@ -125,7 +125,7 @@ public function testRenderProvider()
125125
array('ISBN', 'Title', 'Author'),
126126
$books,
127127
TableHelper::LAYOUT_BORDERLESS,
128-
<<<TABLE
128+
<<<'TABLE'
129129
=============== ========================== ==================
130130
ISBN Title Author
131131
=============== ========================== ==================

src/Symfony/Component/Console/Tests/Helper/ProcessHelperTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,35 +46,35 @@ public function testPassedCallbackIsExecuted()
4646

4747
public function provideCommandsAndOutput()
4848
{
49-
$successOutputVerbose = <<<EOT
49+
$successOutputVerbose = <<<'EOT'
5050
RUN php -r "echo 42;"
5151
RES Command ran successfully
5252

5353
EOT;
54-
$successOutputDebug = <<<EOT
54+
$successOutputDebug = <<<'EOT'
5555
RUN php -r "echo 42;"
5656
OUT 42
5757
RES Command ran successfully
5858

5959
EOT;
60-
$successOutputDebugWithTags = <<<EOT
60+
$successOutputDebugWithTags = <<<'EOT'
6161
RUN php -r "echo '<info>42</info>';"
6262
OUT <info>42</info>
6363
RES Command ran successfully
6464

6565
EOT;
66-
$successOutputProcessDebug = <<<EOT
66+
$successOutputProcessDebug = <<<'EOT'
6767
RUN 'php' '-r' 'echo 42;'
6868
OUT 42
6969
RES Command ran successfully
7070

7171
EOT;
72-
$syntaxErrorOutputVerbose = <<<EOT
72+
$syntaxErrorOutputVerbose = <<<'EOT'
7373
RUN php -r "fwrite(STDERR, 'error message');usleep(50000);fwrite(STDOUT, 'out message');exit(252);"
7474
RES 252 Command did not run successfully
7575

7676
EOT;
77-
$syntaxErrorOutputDebug = <<<EOT
77+
$syntaxErrorOutputDebug = <<<'EOT'
7878
RUN php -r "fwrite(STDERR, 'error message');usleep(500000);fwrite(STDOUT, 'out message');exit(252);"
7979
ERR error message
8080
OUT out message

src/Symfony/Component/Console/Tests/Helper/ProgressBarTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -273,8 +273,6 @@ public function testSetCurrentProgress()
273273
);
274274
}
275275

276-
/**
277-
*/
278276
public function testSetCurrentBeforeStarting()
279277
{
280278
$bar = new ProgressBar($this->getOutputStream());
@@ -588,7 +586,6 @@ public function testAnsiColorsAndEmojis()
588586

589587
rewind($output->getStream());
590588
$this->assertEquals(
591-
592589
" \033[44;37m Starting the demo... fingers crossed \033[0m\n".
593590
' 0/15 '.$progress.str_repeat($empty, 26)." 0%\n".
594591
" \xf0\x9f\x8f\x81 < 1 sec \033[44;37m 0 B \033[0m"

0 commit comments

Comments
 (0)
0