Skip to content

Commit 219758e

Browse files
committed
fixed CS
1 parent 13014cc commit 219758e

File tree

1 file changed

+35
-35
lines changed

1 file changed

+35
-35
lines changed

Tests/Extension/TranslationExtensionTest.php

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public function testTrans($template, $expected, array $variables = [])
4949
* @group legacy
5050
* @dataProvider getTransChoiceTests
5151
*/
52-
public function testTransChoice($template, $expected, array $variables = array())
52+
public function testTransChoice($template, $expected, array $variables = [])
5353
{
5454
$this->testTrans($template, $expected, $variables);
5555
}
@@ -98,67 +98,67 @@ public function getTransTests()
9898
['{% trans into "fr"%}Hello{% endtrans %}', 'Hello'],
9999

100100
// trans with count
101-
array(
101+
[
102102
'{% trans from "messages" %}{0} There is no apples|{1} There is one apple|]1,Inf] There is %count% apples{% endtrans %}',
103103
'There is no apples',
104-
array('count' => 0),
105-
),
106-
array(
104+
['count' => 0],
105+
],
106+
[
107107
'{% trans %}{0} There is no apples|{1} There is one apple|]1,Inf] There is %count% apples{% endtrans %}',
108108
'There is 5 apples',
109-
array('count' => 5),
110-
),
111-
array(
109+
['count' => 5],
110+
],
111+
[
112112
'{% trans %}{0} There is no apples|{1} There is one apple|]1,Inf] There is %count% apples (%name%){% endtrans %}',
113113
'There is 5 apples (Symfony)',
114-
array('count' => 5, 'name' => 'Symfony'),
115-
),
116-
array(
114+
['count' => 5, 'name' => 'Symfony'],
115+
],
116+
[
117117
'{% trans with { \'%name%\': \'Symfony\' } %}{0} There is no apples|{1} There is one apple|]1,Inf] There is %count% apples (%name%){% endtrans %}',
118118
'There is 5 apples (Symfony)',
119-
array('count' => 5),
120-
),
121-
array(
119+
['count' => 5],
120+
],
121+
[
122122
'{% trans into "fr"%}{0} There is no apples|{1} There is one apple|]1,Inf] There is %count% apples{% endtrans %}',
123123
'There is no apples',
124-
array('count' => 0),
125-
),
126-
array(
124+
['count' => 0],
125+
],
126+
[
127127
'{% trans count 5 into "fr"%}{0} There is no apples|{1} There is one apple|]1,Inf] There is %count% apples{% endtrans %}',
128128
'There is 5 apples',
129-
),
129+
],
130130

131131
// trans filter
132-
array('{{ "Hello"|trans }}', 'Hello'),
133-
array('{{ name|trans }}', 'Symfony', array('name' => 'Symfony')),
134-
array('{{ hello|trans({ \'%name%\': \'Symfony\' }) }}', 'Hello Symfony', array('hello' => 'Hello %name%')),
135-
array('{% set vars = { \'%name%\': \'Symfony\' } %}{{ hello|trans(vars) }}', 'Hello Symfony', array('hello' => 'Hello %name%')),
136-
array('{{ "Hello"|trans({}, "messages", "fr") }}', 'Hello'),
132+
['{{ "Hello"|trans }}', 'Hello'],
133+
['{{ name|trans }}', 'Symfony', ['name' => 'Symfony']],
134+
['{{ hello|trans({ \'%name%\': \'Symfony\' }) }}', 'Hello Symfony', ['hello' => 'Hello %name%']],
135+
['{% set vars = { \'%name%\': \'Symfony\' } %}{{ hello|trans(vars) }}', 'Hello Symfony', ['hello' => 'Hello %name%']],
136+
['{{ "Hello"|trans({}, "messages", "fr") }}', 'Hello'],
137137

138138
// trans filter with count
139-
array('{{ "{0} There is no apples|{1} There is one apple|]1,Inf] There is %count% apples"|trans(count=count) }}', 'There is 5 apples', array('count' => 5)),
140-
array('{{ text|trans(count=5, arguments={\'%name%\': \'Symfony\'}) }}', 'There is 5 apples (Symfony)', array('text' => '{0} There is no apples|{1} There is one apple|]1,Inf] There is %count% apples (%name%)')),
141-
array('{{ "{0} There is no apples|{1} There is one apple|]1,Inf] There is %count% apples"|trans({}, "messages", "fr", count) }}', 'There is 5 apples', array('count' => 5)),
142-
);
139+
['{{ "{0} There is no apples|{1} There is one apple|]1,Inf] There is %count% apples"|trans(count=count) }}', 'There is 5 apples', ['count' => 5]],
140+
['{{ text|trans(count=5, arguments={\'%name%\': \'Symfony\'}) }}', 'There is 5 apples (Symfony)', ['text' => '{0} There is no apples|{1} There is one apple|]1,Inf] There is %count% apples (%name%)']],
141+
['{{ "{0} There is no apples|{1} There is one apple|]1,Inf] There is %count% apples"|trans({}, "messages", "fr", count) }}', 'There is 5 apples', ['count' => 5]],
142+
];
143143
}
144144

145145
/**
146146
* @group legacy
147147
*/
148148
public function getTransChoiceTests()
149149
{
150-
return array(
150+
return [
151151
// trans tag
152-
array('{% trans %}Hello{% endtrans %}', 'Hello'),
153-
array('{% trans %}%name%{% endtrans %}', 'Symfony', array('name' => 'Symfony')),
152+
['{% trans %}Hello{% endtrans %}', 'Hello'],
153+
['{% trans %}%name%{% endtrans %}', 'Symfony', ['name' => 'Symfony']],
154154

155-
array('{% trans from elsewhere %}Hello{% endtrans %}', 'Hello'),
155+
['{% trans from elsewhere %}Hello{% endtrans %}', 'Hello'],
156156

157-
array('{% trans %}Hello %name%{% endtrans %}', 'Hello Symfony', array('name' => 'Symfony')),
158-
array('{% trans with { \'%name%\': \'Symfony\' } %}Hello %name%{% endtrans %}', 'Hello Symfony'),
159-
array('{% set vars = { \'%name%\': \'Symfony\' } %}{% trans with vars %}Hello %name%{% endtrans %}', 'Hello Symfony'),
157+
['{% trans %}Hello %name%{% endtrans %}', 'Hello Symfony', ['name' => 'Symfony']],
158+
['{% trans with { \'%name%\': \'Symfony\' } %}Hello %name%{% endtrans %}', 'Hello Symfony'],
159+
['{% set vars = { \'%name%\': \'Symfony\' } %}{% trans with vars %}Hello %name%{% endtrans %}', 'Hello Symfony'],
160160

161-
array('{% trans into "fr"%}Hello{% endtrans %}', 'Hello'),
161+
['{% trans into "fr"%}Hello{% endtrans %}', 'Hello'],
162162

163163
// transchoice
164164
[

0 commit comments

Comments
 (0)