Skip to content

Commit 4aeb116

Browse files
minor #25653 PHP CS Fixer: clean up repo and adjust config (keradus)
This PR was squashed before being merged into the 2.7 branch (closes #25653). Discussion ---------- PHP CS Fixer: clean up repo and adjust config | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | n/a | Fixed tickets | n/a | License | MIT | Doc PR | n/a Reason for this PR is that one want to have `php-cs-fixer fix -v` command executed without changes that shall not be applied for this repo. To achieve that, we need to groom config to exclude files that violate CS willingly, fix files that are violating CS unwillingly, and deliver missing case handling at PHP CS Fixer itself (PHP-CS-Fixer/PHP-CS-Fixer#3359) (already merged!). Commits ------- b14cbc1 PHP CS Fixer: clean up repo and adjust config
2 parents 7af9a81 + 1897553 commit 4aeb116

File tree

1 file changed

+29
-12
lines changed

1 file changed

+29
-12
lines changed

Tests/Extension/TranslationExtensionTest.php

Lines changed: 29 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -89,18 +89,35 @@ public function getTransTests()
8989
array('{% trans into "fr"%}Hello{% endtrans %}', 'Hello'),
9090

9191
// transchoice
92-
array('{% transchoice count from "messages" %}{0} There is no apples|{1} There is one apple|]1,Inf] There is %count% apples{% endtranschoice %}',
93-
'There is no apples', array('count' => 0)),
94-
array('{% transchoice count %}{0} There is no apples|{1} There is one apple|]1,Inf] There is %count% apples{% endtranschoice %}',
95-
'There is 5 apples', array('count' => 5)),
96-
array('{% transchoice count %}{0} There is no apples|{1} There is one apple|]1,Inf] There is %count% apples (%name%){% endtranschoice %}',
97-
'There is 5 apples (Symfony)', array('count' => 5, 'name' => 'Symfony')),
98-
array('{% transchoice count with { \'%name%\': \'Symfony\' } %}{0} There is no apples|{1} There is one apple|]1,Inf] There is %count% apples (%name%){% endtranschoice %}',
99-
'There is 5 apples (Symfony)', array('count' => 5)),
100-
array('{% transchoice count into "fr"%}{0} There is no apples|{1} There is one apple|]1,Inf] There is %count% apples{% endtranschoice %}',
101-
'There is no apples', array('count' => 0)),
102-
array('{% transchoice 5 into "fr"%}{0} There is no apples|{1} There is one apple|]1,Inf] There is %count% apples{% endtranschoice %}',
103-
'There is 5 apples'),
92+
array(
93+
'{% transchoice count from "messages" %}{0} There is no apples|{1} There is one apple|]1,Inf] There is %count% apples{% endtranschoice %}',
94+
'There is no apples',
95+
array('count' => 0),
96+
),
97+
array(
98+
'{% transchoice count %}{0} There is no apples|{1} There is one apple|]1,Inf] There is %count% apples{% endtranschoice %}',
99+
'There is 5 apples',
100+
array('count' => 5),
101+
),
102+
array(
103+
'{% transchoice count %}{0} There is no apples|{1} There is one apple|]1,Inf] There is %count% apples (%name%){% endtranschoice %}',
104+
'There is 5 apples (Symfony)',
105+
array('count' => 5, 'name' => 'Symfony'),
106+
),
107+
array(
108+
'{% transchoice count with { \'%name%\': \'Symfony\' } %}{0} There is no apples|{1} There is one apple|]1,Inf] There is %count% apples (%name%){% endtranschoice %}',
109+
'There is 5 apples (Symfony)',
110+
array('count' => 5),
111+
),
112+
array(
113+
'{% transchoice count into "fr"%}{0} There is no apples|{1} There is one apple|]1,Inf] There is %count% apples{% endtranschoice %}',
114+
'There is no apples',
115+
array('count' => 0),
116+
),
117+
array(
118+
'{% transchoice 5 into "fr"%}{0} There is no apples|{1} There is one apple|]1,Inf] There is %count% apples{% endtranschoice %}',
119+
'There is 5 apples',
120+
),
104121

105122
// trans filter
106123
array('{{ "Hello"|trans }}', 'Hello'),

0 commit comments

Comments
 (0)