Skip to content

Commit 4401fe8

Browse files
committed
fixed short array CS in comments
1 parent 9c70d1a commit 4401fe8

File tree

6 files changed

+19
-19
lines changed

6 files changed

+19
-19
lines changed

Command/CacheClearCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ protected function buildContainer()
338338
339339
// filter container's resources, removing reference to temp kernel file
340340
\$resources = \$container->getResources();
341-
\$filteredResources = array();
341+
\$filteredResources = [];
342342
foreach (\$resources as \$resource) {
343343
if ((string) \$resource !== __FILE__) {
344344
\$filteredResources[] = \$resource;

Kernel/MicroKernelTrait.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ abstract protected function configureRoutes(RouteCollectionBuilder $routes);
3939
*
4040
* You can register extensions:
4141
*
42-
* $c->loadFromExtension('framework', array(
42+
* $c->loadFromExtension('framework', [
4343
* 'secret' => '%secret%'
44-
* ));
44+
* ]);
4545
*
4646
* Or services:
4747
*

Templating/Helper/FormHelper.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ public function setTheme(FormView $view, $themes, $useDefaultThemes = true)
6161
*
6262
* You can pass options during the call:
6363
*
64-
* <?php echo view['form']->form($form, array('attr' => array('class' => 'foo'))) ?>
64+
* <?php echo view['form']->form($form, ['attr' => ['class' => 'foo']]) ?>
6565
*
66-
* <?php echo view['form']->form($form, array('separator' => '+++++')) ?>
66+
* <?php echo view['form']->form($form, ['separator' => '+++++']) ?>
6767
*
6868
* This method is mainly intended for prototyping purposes. If you want to
6969
* control the layout of a form in a more fine-grained manner, you are
@@ -124,9 +124,9 @@ public function end(FormView $view, array $variables = [])
124124
*
125125
* You can pass options during the call:
126126
*
127-
* <?php echo $view['form']->widget($form, array('attr' => array('class' => 'foo'))) ?>
127+
* <?php echo $view['form']->widget($form, ['attr' => ['class' => 'foo']]) ?>
128128
*
129-
* <?php echo $view['form']->widget($form, array('separator' => '+++++')) ?>
129+
* <?php echo $view['form']->widget($form, ['separator' => '+++++']) ?>
130130
*
131131
* @param FormView $view The view for which to render the widget
132132
* @param array $variables Additional variables passed to the template

Tests/Fixtures/Resources/views/translation.html.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,21 +29,21 @@
2929
<?php echo $view['translator']->transChoice(
3030
'{0} There is no apples|{1} There is one apple|]1,Inf[ There are %count% apples',
3131
10,
32-
array('%count%' => 10)
32+
['%count%' => 10]
3333
) ?>
3434

35-
<?php echo $view['translator']->trans('other-domain-test-no-params-short-array', array(), 'not_messages'); ?>
35+
<?php echo $view['translator']->trans('other-domain-test-no-params-short-array', [], 'not_messages'); ?>
3636

37-
<?php echo $view['translator']->trans('other-domain-test-no-params-long-array', array(), 'not_messages'); ?>
37+
<?php echo $view['translator']->trans('other-domain-test-no-params-long-array', [], 'not_messages'); ?>
3838

39-
<?php echo $view['translator']->trans('other-domain-test-params-short-array', array('foo' => 'bar'), 'not_messages'); ?>
39+
<?php echo $view['translator']->trans('other-domain-test-params-short-array', ['foo' => 'bar'], 'not_messages'); ?>
4040

41-
<?php echo $view['translator']->trans('other-domain-test-params-long-array', array('foo' => 'bar'), 'not_messages'); ?>
41+
<?php echo $view['translator']->trans('other-domain-test-params-long-array', ['foo' => 'bar'], 'not_messages'); ?>
4242

43-
<?php echo $view['translator']->transChoice('other-domain-test-trans-choice-short-array-%count%', 10, array('%count%' => 10), 'not_messages'); ?>
43+
<?php echo $view['translator']->transChoice('other-domain-test-trans-choice-short-array-%count%', 10, ['%count%' => 10], 'not_messages'); ?>
4444

45-
<?php echo $view['translator']->transChoice('other-domain-test-trans-choice-long-array-%count%', 10, array('%count%' => 10), 'not_messages'); ?>
45+
<?php echo $view['translator']->transChoice('other-domain-test-trans-choice-long-array-%count%', 10, ['%count%' => 10], 'not_messages'); ?>
4646

47-
<?php echo $view['translator']->trans('typecast', array('a' => (int) '123'), 'not_messages'); ?>
48-
<?php echo $view['translator']->transChoice('msg1', 10 + 1, array(), 'not_messages'); ?>
49-
<?php echo $view['translator']->transChoice('msg2', ceil(4.5), array(), 'not_messages'); ?>
47+
<?php echo $view['translator']->trans('typecast', ['a' => (int) '123'], 'not_messages'); ?>
48+
<?php echo $view['translator']->transChoice('msg1', 10 + 1, [], 'not_messages'); ?>
49+
<?php echo $view['translator']->transChoice('msg2', ceil(4.5), [], 'not_messages'); ?>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
<?php if (!$label) { $label = $view['form']->humanize($name); } ?>
2-
<label>Custom name label: <?php echo $view->escape($view['translator']->trans($label, array(), $translation_domain)) ?></label>
2+
<label>Custom name label: <?php echo $view->escape($view['translator']->trans($label, [], $translation_domain)) ?></label>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<?php if (!$label) {
22
$label = $view['form']->humanize($name);
33
} ?>
4-
<label>Custom label: <?php echo $view->escape($view['translator']->trans($label, array(), $translation_domain)) ?></label>
4+
<label>Custom label: <?php echo $view->escape($view['translator']->trans($label, [], $translation_domain)) ?></label>

0 commit comments

Comments
 (0)