@@ -60,7 +60,7 @@ public function __construct(TokenStorageInterface $tokenStorage = null, RoleHier
6060 public function collect (Request $ request , Response $ response , \Exception $ exception = null )
6161 {
6262 if (null === $ this ->tokenStorage ) {
63- $ this ->data = array (
63+ $ this ->data = [
6464 'enabled ' => false ,
6565 'authenticated ' => false ,
6666 'impersonated ' => false ,
@@ -70,12 +70,12 @@ public function collect(Request $request, Response $response, \Exception $except
7070 'token_class ' => null ,
7171 'logout_url ' => null ,
7272 'user ' => '' ,
73- 'roles ' => array () ,
74- 'inherited_roles ' => array () ,
73+ 'roles ' => [] ,
74+ 'inherited_roles ' => [] ,
7575 'supports_role_hierarchy ' => null !== $ this ->roleHierarchy ,
76- ) ;
76+ ] ;
7777 } elseif (null === $ token = $ this ->tokenStorage ->getToken ()) {
78- $ this ->data = array (
78+ $ this ->data = [
7979 'enabled ' => true ,
8080 'authenticated ' => false ,
8181 'impersonated ' => false ,
@@ -85,12 +85,12 @@ public function collect(Request $request, Response $response, \Exception $except
8585 'token_class ' => null ,
8686 'logout_url ' => null ,
8787 'user ' => '' ,
88- 'roles ' => array () ,
89- 'inherited_roles ' => array () ,
88+ 'roles ' => [] ,
89+ 'inherited_roles ' => [] ,
9090 'supports_role_hierarchy ' => null !== $ this ->roleHierarchy ,
91- ) ;
91+ ] ;
9292 } else {
93- $ inheritedRoles = array () ;
93+ $ inheritedRoles = [] ;
9494 $ assignedRoles = $ token ->getRoles ();
9595
9696 $ impersonatorUser = null ;
@@ -119,7 +119,7 @@ public function collect(Request $request, Response $response, \Exception $except
119119 // fail silently when the logout URL cannot be generated
120120 }
121121
122- $ this ->data = array (
122+ $ this ->data = [
123123 'enabled ' => true ,
124124 'authenticated ' => $ token ->isAuthenticated (),
125125 'impersonated ' => null !== $ impersonatorUser ,
@@ -132,7 +132,7 @@ public function collect(Request $request, Response $response, \Exception $except
132132 'roles ' => array_map (function (Role $ role ) { return $ role ->getRole (); }, $ assignedRoles ),
133133 'inherited_roles ' => array_unique (array_map (function (Role $ role ) { return $ role ->getRole (); }, $ inheritedRoles )),
134134 'supports_role_hierarchy ' => null !== $ this ->roleHierarchy ,
135- ) ;
135+ ] ;
136136 }
137137
138138 // collect voters and access decision manager information
@@ -150,32 +150,32 @@ public function collect(Request $request, Response $response, \Exception $except
150150 // collect voter details
151151 $ decisionLog = $ this ->accessDecisionManager ->getDecisionLog ();
152152 foreach ($ decisionLog as $ key => $ log ) {
153- $ decisionLog [$ key ]['voter_details ' ] = array () ;
153+ $ decisionLog [$ key ]['voter_details ' ] = [] ;
154154 foreach ($ log ['voterDetails ' ] as $ voterDetail ) {
155155 $ voterClass = \get_class ($ voterDetail ['voter ' ]);
156156 $ classData = $ this ->hasVarDumper ? new ClassStub ($ voterClass ) : $ voterClass ;
157- $ decisionLog [$ key ]['voter_details ' ][] = array (
157+ $ decisionLog [$ key ]['voter_details ' ][] = [
158158 'class ' => $ classData ,
159159 'attributes ' => $ voterDetail ['attributes ' ], // Only displayed for unanimous strategy
160160 'vote ' => $ voterDetail ['vote ' ],
161- ) ;
161+ ] ;
162162 }
163163 unset($ decisionLog [$ key ]['voterDetails ' ]);
164164 }
165165
166166 $ this ->data ['access_decision_log ' ] = $ decisionLog ;
167167 } else {
168- $ this ->data ['access_decision_log ' ] = array () ;
168+ $ this ->data ['access_decision_log ' ] = [] ;
169169 $ this ->data ['voter_strategy ' ] = 'unknown ' ;
170- $ this ->data ['voters ' ] = array () ;
170+ $ this ->data ['voters ' ] = [] ;
171171 }
172172
173173 // collect firewall context information
174174 $ this ->data ['firewall ' ] = null ;
175175 if ($ this ->firewallMap instanceof FirewallMap) {
176176 $ firewallConfig = $ this ->firewallMap ->getFirewallConfig ($ request );
177177 if (null !== $ firewallConfig ) {
178- $ this ->data ['firewall ' ] = array (
178+ $ this ->data ['firewall ' ] = [
179179 'name ' => $ firewallConfig ->getName (),
180180 'allows_anonymous ' => $ firewallConfig ->allowsAnonymous (),
181181 'request_matcher ' => $ firewallConfig ->getRequestMatcher (),
@@ -188,7 +188,7 @@ public function collect(Request $request, Response $response, \Exception $except
188188 'access_denied_url ' => $ firewallConfig ->getAccessDeniedUrl (),
189189 'user_checker ' => $ firewallConfig ->getUserChecker (),
190190 'listeners ' => $ firewallConfig ->getListeners (),
191- ) ;
191+ ] ;
192192
193193 // generate exit impersonation path from current request
194194 if ($ this ->data ['impersonated ' ] && null !== $ switchUserConfig = $ firewallConfig ->getSwitchUser ()) {
@@ -202,7 +202,7 @@ public function collect(Request $request, Response $response, \Exception $except
202202 }
203203
204204 // collect firewall listeners information
205- $ this ->data ['listeners ' ] = array () ;
205+ $ this ->data ['listeners ' ] = [] ;
206206 if ($ this ->firewall ) {
207207 $ this ->data ['listeners ' ] = $ this ->firewall ->getWrappedListeners ();
208208 }
@@ -213,7 +213,7 @@ public function collect(Request $request, Response $response, \Exception $except
213213 */
214214 public function reset ()
215215 {
216- $ this ->data = array () ;
216+ $ this ->data = [] ;
217217 }
218218
219219 public function lateCollect ()
0 commit comments