@@ -67,6 +67,7 @@ public function setContainer(ContainerInterface $container): ?ContainerInterface
67
67
{
68
68
$ previous = $ this ->container ;
69
69
$ this ->container = $ container ;
70
+ $ this ->container = $ container ;
70
71
71
72
return $ previous ;
72
73
}
@@ -207,30 +208,30 @@ protected function addFlash(string $type, $message): void
207
208
}
208
209
209
210
/**
210
- * Checks if the attributes are granted against the current authentication token and optionally supplied subject.
211
+ * Checks if the attribute is granted against the current authentication token and optionally supplied subject.
211
212
*
212
213
* @throws \LogicException
213
214
*/
214
- protected function isGranted ($ attributes , $ subject = null ): bool
215
+ protected function isGranted ($ attribute , $ subject = null ): bool
215
216
{
216
217
if (!$ this ->container ->has ('security.authorization_checker ' )) {
217
218
throw new \LogicException ('The SecurityBundle is not registered in your application. Try running "composer require symfony/security-bundle". ' );
218
219
}
219
220
220
- return $ this ->container ->get ('security.authorization_checker ' )->isGranted ($ attributes , $ subject );
221
+ return $ this ->container ->get ('security.authorization_checker ' )->isGranted ($ attribute , $ subject );
221
222
}
222
223
223
224
/**
224
- * Throws an exception unless the attributes are granted against the current authentication token and optionally
225
+ * Throws an exception unless the attribute is granted against the current authentication token and optionally
225
226
* supplied subject.
226
227
*
227
228
* @throws AccessDeniedException
228
229
*/
229
- protected function denyAccessUnlessGranted ($ attributes , $ subject = null , string $ message = 'Access Denied. ' ): void
230
+ protected function denyAccessUnlessGranted ($ attribute , $ subject = null , string $ message = 'Access Denied. ' ): void
230
231
{
231
- if (!$ this ->isGranted ($ attributes , $ subject )) {
232
+ if (!$ this ->isGranted ($ attribute , $ subject )) {
232
233
$ exception = $ this ->createAccessDeniedException ($ message );
233
- $ exception ->setAttributes ($ attributes );
234
+ $ exception ->setAttributes ($ attribute );
234
235
$ exception ->setSubject ($ subject );
235
236
236
237
throw $ exception ;
0 commit comments