@@ -72,21 +72,21 @@ method::
7272 // a callback to return the label for a given choice
7373 // if a placeholder is used, its empty value (null) may be passed but
7474 // its label is defined by its own "placeholder" option
75- 'choice_label' => function(?Category $category) {
75+ 'choice_label' => function (?Category $category) {
7676 return $category ? strtoupper($category->getName()) : '';
7777 },
7878 // returns the html attributes for each option input (may be radio/checkbox)
79- 'choice_attr' => function(?Category $category) {
79+ 'choice_attr' => function (?Category $category) {
8080 return $category ? ['class' => 'category_'.strtolower($category->getName())] : [];
8181 },
8282 // every option can use a string property path or any callable that get
8383 // passed each choice as argument, but it may not be needed
84- 'group_by' => function() {
84+ 'group_by' => function () {
8585 // randomly assign things into 2 groups
8686 return rand(0, 1) == 1 ? 'Group A' : 'Group B';
8787 },
8888 // a callback to return whether a category is preferred
89- 'preferred_choices' => function(?Category $category) {
89+ 'preferred_choices' => function (?Category $category) {
9090 return $category && 100 < $category->getArticleCounts();
9191 },
9292 ]);
@@ -190,7 +190,7 @@ if you want to take advantage of lazy loading::
190190 // ...
191191
192192 $builder->add('constants', ChoiceType::class, [
193- 'choice_loader' => new CallbackChoiceLoader(function() {
193+ 'choice_loader' => new CallbackChoiceLoader(function () {
194194 return StaticClass::getConstants();
195195 }),
196196 ]);
0 commit comments