@@ -27,12 +27,12 @@ class CachingFactoryDecorator implements ChoiceListFactoryInterface
2727 /**
2828 * @var ChoiceListInterface[]
2929 */
30- private $ lists = array () ;
30+ private $ lists = [] ;
3131
3232 /**
3333 * @var ChoiceListView[]
3434 */
35- private $ views = array () ;
35+ private $ views = [] ;
3636
3737 /**
3838 * Generates a SHA-256 hash for the given value.
@@ -89,7 +89,7 @@ public function createListFromChoices($choices, $value = null)
8989 // The value is not validated on purpose. The decorated factory may
9090 // decide which values to accept and which not.
9191
92- $ hash = self ::generateHash (array ( $ choices , $ value) , 'fromChoices ' );
92+ $ hash = self ::generateHash ([ $ choices , $ value] , 'fromChoices ' );
9393
9494 if (!isset ($ this ->lists [$ hash ])) {
9595 $ this ->lists [$ hash ] = $ this ->decoratedFactory ->createListFromChoices ($ choices , $ value );
@@ -103,7 +103,7 @@ public function createListFromChoices($choices, $value = null)
103103 */
104104 public function createListFromLoader (ChoiceLoaderInterface $ loader , $ value = null )
105105 {
106- $ hash = self ::generateHash (array ( $ loader , $ value) , 'fromLoader ' );
106+ $ hash = self ::generateHash ([ $ loader , $ value] , 'fromLoader ' );
107107
108108 if (!isset ($ this ->lists [$ hash ])) {
109109 $ this ->lists [$ hash ] = $ this ->decoratedFactory ->createListFromLoader ($ loader , $ value );
@@ -119,7 +119,7 @@ public function createView(ChoiceListInterface $list, $preferredChoices = null,
119119 {
120120 // The input is not validated on purpose. This way, the decorated
121121 // factory may decide which input to accept and which not.
122- $ hash = self ::generateHash (array ( $ list , $ preferredChoices , $ label , $ index , $ groupBy , $ attr) );
122+ $ hash = self ::generateHash ([ $ list , $ preferredChoices , $ label , $ index , $ groupBy , $ attr] );
123123
124124 if (!isset ($ this ->views [$ hash ])) {
125125 $ this ->views [$ hash ] = $ this ->decoratedFactory ->createView (
0 commit comments