Skip to content

Commit 0583cf8

Browse files
committed
minor symfony#14045 CS: general fixes (keradus)
This PR was merged into the 2.3 branch. Discussion ---------- CS: general fixes | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | ? | Fixed tickets | N/A | License | MIT | Doc PR | N/A After this PR the whole 2.3 version will be valid when running PHP CS Fixer. It is also first step to apply PHP CS Fixer on next version. To keep fabbot.io happy ;) Commits ------- 063ae13 CS: general fixes
2 parents 2c67400 + 063ae13 commit 0583cf8

File tree

31 files changed

+64
-44
lines changed

31 files changed

+64
-44
lines changed

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
phpunit.xml
1+
.php_cs.cache
2+
autoload.php
23
composer.lock
34
composer.phar
4-
autoload.php
55
package*.tar
66
packages.json
7+
phpunit.xml
78
/vendor/

.php_cs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,26 @@
33
return Symfony\CS\Config\Config::create()
44
->setUsingLinter(false)
55
->setUsingCache(true)
6+
->finder(
7+
Symfony\CS\Finder\DefaultFinder::create()
8+
->in(__DIR__)
9+
->exclude(array(
10+
// directories containing files with content that is autogenerated by `var_export`, which breaks CS in output code
11+
'src/Symfony/Component/DependencyInjection/Tests/Fixtures',
12+
'src/Symfony/Component/Routing/Tests/Fixtures/dumper',
13+
// fixture templates
14+
'src/Symfony/Component/Templating/Tests/Fixtures/templates',
15+
// resource templates
16+
'src/Symfony/Bundle/FrameworkBundle/Resources/views/Form',
17+
))
18+
// file content autogenerated by `var_export`
19+
->notPath('src/Symfony/Component/Translation/Tests/fixtures/resources.php')
20+
// autogenerated xmls
21+
->notPath('src/Symfony/Component/Console/Tests/Fixtures/application_1.xml')
22+
->notPath('src/Symfony/Component/Console/Tests/Fixtures/application_2.xml')
23+
// yml
24+
->notPath('src/Symfony/Component/Yaml/Tests/Fixtures/sfTests.yml')
25+
// test template
26+
->notPath('src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/Resources/Custom/_name_entry_label.html.php')
27+
)
628
;

src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/choice_widget_collapsed.html.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
$required = false;
44
endif; ?>
55
<?php echo $view['form']->block($form, 'widget_attributes', array(
6-
'required' => $required
6+
'required' => $required,
77
)) ?>
88
<?php if ($multiple): ?> multiple="multiple"<?php endif ?>
99
>
10-
<?php if (null !== $empty_value): ?><option value=""<?php if ($required and empty($value) && "0" !== $value): ?> selected="selected"<?php endif?>><?php echo $view->escape($view['translator']->trans($empty_value, array(), $translation_domain)) ?></option><?php endif; ?>
10+
<?php if (null !== $empty_value): ?><option value=""<?php if ($required and empty($value) && '0' !== $value): ?> selected="selected"<?php endif?>><?php echo $view->escape($view['translator']->trans($empty_value, array(), $translation_domain)) ?></option><?php endif; ?>
1111
<?php if (count($preferred_choices) > 0): ?>
1212
<?php echo $view['form']->block($form, 'choice_widget_options', array('choices' => $preferred_choices)) ?>
1313
<?php if (count($choices) > 0 && null !== $separator): ?>
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 : "hidden")) ?>
1+
<?php echo $view['form']->block($form, 'form_widget_simple', array('type' => isset($type) ? $type : 'hidden')) ?>
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 : "number")) ?>
1+
<?php echo $view['form']->block($form, 'form_widget_simple', array('type' => isset($type) ? $type : 'number')) ?>
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, '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, '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')) ?>

0 commit comments

Comments
 (0)