Completed
Push — master ( 2f9820...cf246a )
by Alexander
09:44
created
src/Middleware/Impersonate.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 
82 82
             if (!$request->isXmlHttpRequest() && $request->isMethod('GET')) {
83 83
                 $input = $request->input();
84
-                unset($input['_switch_user']);
84
+                unset($input[ '_switch_user' ]);
85 85
                 $input += $request->route()->parameters();
86 86
 
87 87
                 return $this->redirect->route(
@@ -104,11 +104,11 @@  discard block
 block discarded – undo
104 104
      */
105 105
     protected function checkPermission(string $username)
106 106
     {
107
-        $ability  = $this->config->get('pretend.impersonate.auth_check');
107
+        $ability = $this->config->get('pretend.impersonate.auth_check');
108 108
 
109 109
         if (!$this->gate->has($ability)) {
110 110
 
111
-            $this->gate->define($ability, function ($user): bool {
111
+            $this->gate->define($ability, function($user): bool {
112 112
                 if (!$user instanceof Impersonable) {
113 113
                     return false;
114 114
                 }
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
             });
118 118
         }
119 119
 
120
-        if (!$this->gate->forUser($this->guard->user())->check($ability, [$username])) {
120
+        if (!$this->gate->forUser($this->guard->user())->check($ability, [ $username ])) {
121 121
             abort(403, "Current user have no ability '{$ability}'");
122 122
         }
123 123
     }
Please login to merge, or discard this patch.