Skip to content

Commit 5646f5b

Browse files
committed
fixed short array CS in comments
1 parent 9e00d61 commit 5646f5b

File tree

5 files changed

+28
-28
lines changed

5 files changed

+28
-28
lines changed

ChoiceList/ChoiceListInterface.php

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -48,19 +48,19 @@ public function getValues();
4848
* keys of the choices. If the original array contained nested arrays, these
4949
* nested arrays are represented here as well:
5050
*
51-
* $form->add('field', 'choice', array(
52-
* 'choices' => array(
53-
* 'Decided' => array('Yes' => true, 'No' => false),
54-
* 'Undecided' => array('Maybe' => null),
55-
* ),
56-
* ));
51+
* $form->add('field', 'choice', [
52+
* 'choices' => [
53+
* 'Decided' => ['Yes' => true, 'No' => false],
54+
* 'Undecided' => ['Maybe' => null],
55+
* ],
56+
* ]);
5757
*
5858
* In this example, the result of this method is:
5959
*
60-
* array(
61-
* 'Decided' => array('Yes' => '0', 'No' => '1'),
62-
* 'Undecided' => array('Maybe' => '2'),
63-
* )
60+
* [
61+
* 'Decided' => ['Yes' => '0', 'No' => '1'],
62+
* 'Undecided' => ['Maybe' => '2'],
63+
* ]
6464
*
6565
* @return string[] The choice values
6666
*/
@@ -73,12 +73,12 @@ public function getStructuredValues();
7373
* "choice" option of the choice type. Note that this array may contain
7474
* duplicates if the "choice" option contained choice groups:
7575
*
76-
* $form->add('field', 'choice', array(
77-
* 'choices' => array(
78-
* 'Decided' => array(true, false),
79-
* 'Undecided' => array(null),
80-
* ),
81-
* ));
76+
* $form->add('field', 'choice', [
77+
* 'choices' => [
78+
* 'Decided' => [true, false],
79+
* 'Undecided' => [null],
80+
* ],
81+
* ]);
8282
*
8383
* In this example, the original key 0 appears twice, once for `true` and
8484
* once for `null`.

Forms.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@
2626
* ->add('firstName', 'Symfony\Component\Form\Extension\Core\Type\TextType')
2727
* ->add('lastName', 'Symfony\Component\Form\Extension\Core\Type\TextType')
2828
* ->add('age', 'Symfony\Component\Form\Extension\Core\Type\IntegerType')
29-
* ->add('color', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array(
30-
* 'choices' => array('Red' => 'r', 'Blue' => 'b'),
31-
* ))
29+
* ->add('color', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', [
30+
* 'choices' => ['Red' => 'r', 'Blue' => 'b'],
31+
* ])
3232
* ->getForm();
3333
*
3434
* You can also add custom extensions to the form factory:
@@ -68,20 +68,20 @@
6868
* use Symfony\Component\Form\Extension\Templating\TemplatingExtension;
6969
*
7070
* $formFactory = Forms::createFormFactoryBuilder()
71-
* ->addExtension(new TemplatingExtension($engine, null, array(
71+
* ->addExtension(new TemplatingExtension($engine, null, [
7272
* 'FrameworkBundle:Form',
73-
* )))
73+
* ]))
7474
* ->getFormFactory();
7575
*
7676
* The next example shows how to include the "<table>" layout:
7777
*
7878
* use Symfony\Component\Form\Extension\Templating\TemplatingExtension;
7979
*
8080
* $formFactory = Forms::createFormFactoryBuilder()
81-
* ->addExtension(new TemplatingExtension($engine, null, array(
81+
* ->addExtension(new TemplatingExtension($engine, null, [
8282
* 'FrameworkBundle:Form',
8383
* 'FrameworkBundle:FormTable',
84-
* )))
84+
* ]))
8585
* ->getFormFactory();
8686
*
8787
* @author Bernhard Schussek <bschussek@gmail.com>

Tests/Extension/Core/DataTransformer/DateTimeToStringTransformerTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ public function dataProvider()
4141
// this will not work as PHP will use actual date to replace missing info
4242
// and after change of date will lookup for closest Wednesday
4343
// i.e. value: 2010-02, PHP value: 2010-02-(today i.e. 20), parsed date: 2010-02-24
44-
//array('Y-m-D', '2010-02-Wed', '2010-02-03 00:00:00 UTC'),
45-
//array('Y-m-l', '2010-02-Wednesday', '2010-02-03 00:00:00 UTC'),
44+
//['Y-m-D', '2010-02-Wed', '2010-02-03 00:00:00 UTC'],
45+
//['Y-m-l', '2010-02-Wednesday', '2010-02-03 00:00:00 UTC'],
4646

4747
// different month representations
4848
['Y-n-d', '2010-2-03', '2010-02-03 00:00:00 UTC'],

Tests/Util/StringUtilTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function spaceProvider()
4747
['0020'],
4848
['00A0'],
4949
['1680'],
50-
// array('180E'),
50+
// ['180E'],
5151
['2000'],
5252
['2001'],
5353
['2002'],
@@ -72,7 +72,7 @@ public function spaceProvider()
7272
['000D'],
7373
['0085'],
7474
// zero width space
75-
// array('200B'),
75+
// ['200B'],
7676
];
7777
}
7878

Util/FormUtil.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ private function __construct()
3636
*/
3737
public static function isEmpty($data)
3838
{
39-
// Should not do a check for array() === $data!!!
39+
// Should not do a check for [] === $data!!!
4040
// This method is used in occurrences where arrays are
4141
// not considered to be empty, ever.
4242
return null === $data || '' === $data;

0 commit comments

Comments
 (0)