Completed
Pull Request — master (#1216)
by Kévin
02:49
created
src/Security/ExpressionLanguage.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,9 +26,9 @@
 block discarded – undo
26 26
     {
27 27
         parent::registerFunctions();
28 28
 
29
-        $this->register('is_granted', function ($attributes, $object = 'null') {
29
+        $this->register('is_granted', function($attributes, $object = 'null') {
30 30
             return sprintf('$auth_checker->isGranted(%s, %s)', $attributes, $object);
31
-        }, function (array $variables, $attributes, $object = null) {
31
+        }, function(array $variables, $attributes, $object = null) {
32 32
             return $variables['auth_checker']->isGranted($attributes, $object);
33 33
         });
34 34
     }
Please login to merge, or discard this patch.
src/Security/EventListener/DenyAccessListener.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12
-declare(strict_types=1);
12
+declare(strict_types = 1);
13 13
 
14 14
 namespace ApiPlatform\Core\Security\EventListener;
15 15
 
@@ -101,12 +101,12 @@  discard block
 block discarded – undo
101 101
         $token = $this->tokenStorage->getToken();
102 102
         $roles = $this->roleHierarchy ? $this->roleHierarchy->getReachableRoles($token->getRoles()) : $token->getRoles();
103 103
 
104
-        $variables =[
104
+        $variables = [
105 105
             'token' => $token,
106 106
             'user' => $token->getUser(),
107 107
             'object' => $request->attributes->get('data'),
108 108
             'request' => $request,
109
-            'roles' => array_map(function ($role) {return $role->getRole(); }, $roles),
109
+            'roles' => array_map(function($role) {return $role->getRole(); }, $roles),
110 110
             'trust_resolver' => $this->authenticationTrustResolver,
111 111
             // needed for the is_granted expression function
112 112
             'auth_checker' => $this->authorizationChecker,
Please login to merge, or discard this patch.