@@ -10,11 +10,11 @@  | 
                                                    ||
| 10 | 10 |  { | 
                                                        
| 11 | 11 | public function authorizeMatchedRoutes()  | 
                                                        
| 12 | 12 |      { | 
                                                        
| 13 | -        Route::matched(function (RouteMatched $eventObj) { | 
                                                        |
| 13 | +        Route::matched(function(RouteMatched $eventObj) { | 
                                                        |
| 14 | 14 | $matchedRoute = [  | 
                                                        
| 15 | 15 | $eventObj->route->getName(),  | 
                                                        
| 16 | 16 | $eventObj->route->getActionName(),  | 
                                                        
| 17 | - $eventObj->request->method().$eventObj->route->uri,  | 
                                                        |
| 17 | + $eventObj->request->method() . $eventObj->route->uri,  | 
                                                        |
| 18 | 18 | ];  | 
                                                        
| 19 | 19 | |
| 20 | 20 | $closures = app(RouterEventManager::class)->findMatchingCallbacks($matchedRoute);  | 
                                                        
@@ -6,8 +6,8 @@  | 
                                                    ||
| 6 | 6 |  { | 
                                                        
| 7 | 7 | public function wrapForIgnorance(callable $callback, $key): \Closure  | 
                                                        
| 8 | 8 |      { | 
                                                        
| 9 | -        return function (...$args) use ($callback, $key) { | 
                                                        |
| 10 | -            if (!config('heyman_ignore_'.$key, false)) { | 
                                                        |
| 9 | +        return function(...$args) use ($callback, $key) { | 
                                                        |
| 10 | +            if (!config('heyman_ignore_' . $key, false)) { | 
                                                        |
| 11 | 11 | $callback(...$args);  | 
                                                        
| 12 | 12 | }  | 
                                                        
| 13 | 13 | };  | 
                                                        
@@ -45,14 +45,14 @@ discard block  | 
                                                    ||
| 45 | 45 | |
| 46 | 46 | public function addAfterCall($callback, $parameters)  | 
                                                        
| 47 | 47 |      { | 
                                                        
| 48 | -        $this->beforeResponse[] = function () use ($callback, $parameters) { | 
                                                        |
| 48 | +        $this->beforeResponse[] = function() use ($callback, $parameters) { | 
                                                        |
| 49 | 49 | app()->call($callback, $parameters);  | 
                                                        
| 50 | 50 | };  | 
                                                        
| 51 | 51 | }  | 
                                                        
| 52 | 52 | |
| 53 | 53 | public function eventFire($event, array $payload, bool $halt)  | 
                                                        
| 54 | 54 |      { | 
                                                        
| 55 | -        $this->beforeResponse[] = function () use ($event, $payload, $halt) { | 
                                                        |
| 55 | +        $this->beforeResponse[] = function() use ($event, $payload, $halt) { | 
                                                        |
| 56 | 56 |              app('events')->dispatch($event, $payload, $halt); | 
                                                        
| 57 | 57 | };  | 
                                                        
| 58 | 58 | }  | 
                                                        
@@ -74,7 +74,7 @@ discard block  | 
                                                    ||
| 74 | 74 | $calls = $this->beforeResponse;  | 
                                                        
| 75 | 75 | $this->beforeResponse = [];  | 
                                                        
| 76 | 76 | |
| 77 | -        return function () use ($calls) { | 
                                                        |
| 77 | +        return function() use ($calls) { | 
                                                        |
| 78 | 78 |              foreach ($calls as $call) { | 
                                                        
| 79 | 79 | $call();  | 
                                                        
| 80 | 80 | }  | 
                                                        
@@ -30,14 +30,14 @@ discard block  | 
                                                    ||
| 30 | 30 | |
| 31 | 31 | protected function abort($abort): \Closure  | 
                                                        
| 32 | 32 |      { | 
                                                        
| 33 | -        return function () use ($abort) { | 
                                                        |
| 33 | +        return function() use ($abort) { | 
                                                        |
| 34 | 34 | abort(...$abort);  | 
                                                        
| 35 | 35 | };  | 
                                                        
| 36 | 36 | }  | 
                                                        
| 37 | 37 | |
| 38 | 38 | protected function nothing(): \Closure  | 
                                                        
| 39 | 39 |      { | 
                                                        
| 40 | -        return function () { | 
                                                        |
| 40 | +        return function() { | 
                                                        |
| 41 | 41 | };  | 
                                                        
| 42 | 42 | }  | 
                                                        
| 43 | 43 | |
@@ -48,7 +48,7 @@ discard block  | 
                                                    ||
| 48 | 48 | */  | 
                                                        
| 49 | 49 | protected function exception(array $e): \Closure  | 
                                                        
| 50 | 50 |      { | 
                                                        
| 51 | -        return function () use ($e) { | 
                                                        |
| 51 | +        return function() use ($e) { | 
                                                        |
| 52 | 52 | $exClass = $e['class'];  | 
                                                        
| 53 | 53 | |
| 54 | 54 | throw new $exClass($e['message']);  | 
                                                        
@@ -62,21 +62,21 @@ discard block  | 
                                                    ||
| 62 | 62 | */  | 
                                                        
| 63 | 63 | protected function response(array $resp): \Closure  | 
                                                        
| 64 | 64 |      { | 
                                                        
| 65 | -        return function () use ($resp) { | 
                                                        |
| 65 | +        return function() use ($resp) { | 
                                                        |
| 66 | 66 | $this->sendResponse($resp, response());  | 
                                                        
| 67 | 67 | };  | 
                                                        
| 68 | 68 | }  | 
                                                        
| 69 | 69 | |
| 70 | 70 | protected function redirect(array $resp): \Closure  | 
                                                        
| 71 | 71 |      { | 
                                                        
| 72 | -        return function () use ($resp) { | 
                                                        |
| 72 | +        return function() use ($resp) { | 
                                                        |
| 73 | 73 | $this->sendResponse($resp, redirect());  | 
                                                        
| 74 | 74 | };  | 
                                                        
| 75 | 75 | }  | 
                                                        
| 76 | 76 | |
| 77 | 77 | protected function respondFrom($method): \Closure  | 
                                                        
| 78 | 78 |      { | 
                                                        
| 79 | -        return function () use ($method) { | 
                                                        |
| 79 | +        return function() use ($method) { | 
                                                        |
| 80 | 80 | respondWith(app()->call(...$method));  | 
                                                        
| 81 | 81 | };  | 
                                                        
| 82 | 82 | }  | 
                                                        
@@ -106,7 +106,7 @@ discard block  | 
                                                    ||
| 106 | 106 | */  | 
                                                        
| 107 | 107 | public function validatorCallback($modifier, $rules, array $messages = [], array $customAttributes = []): \Closure  | 
                                                        
| 108 | 108 |      { | 
                                                        
| 109 | -        $validator = function () use ($modifier, $rules, $messages, $customAttributes) { | 
                                                        |
| 109 | +        $validator = function() use ($modifier, $rules, $messages, $customAttributes) { | 
                                                        |
| 110 | 110 |              if (is_callable($rules)) { | 
                                                        
| 111 | 111 | $rules = $rules();  | 
                                                        
| 112 | 112 | }  | 
                                                        
@@ -11,12 +11,12 @@ discard block  | 
                                                    ||
| 11 | 11 | */  | 
                                                        
| 12 | 12 | private function normalizeAction($action): array  | 
                                                        
| 13 | 13 |      { | 
                                                        
| 14 | -        $addNamespace = function ($action) { | 
                                                        |
| 14 | +        $addNamespace = function($action) { | 
                                                        |
| 15 | 15 |              if ($action = ltrim($action, '\\')) { | 
                                                        
| 16 | 16 | return $action;  | 
                                                        
| 17 | 17 | }  | 
                                                        
| 18 | 18 | |
| 19 | - return app()->getNamespace().'\\Http\\Controllers\\'.$action;  | 
                                                        |
| 19 | + return app()->getNamespace() . '\\Http\\Controllers\\' . $action;  | 
                                                        |
| 20 | 20 | };  | 
                                                        
| 21 | 21 | |
| 22 | 22 | return array_map($addNamespace, $this->normalizeInput($action));  | 
                                                        
@@ -30,8 +30,8 @@ discard block  | 
                                                    ||
| 30 | 30 | */  | 
                                                        
| 31 | 31 | private function normalizeUrl($url, $verb): array  | 
                                                        
| 32 | 32 |      { | 
                                                        
| 33 | -        $removeSlash = function ($url) use ($verb) { | 
                                                        |
| 34 | - return $verb.ltrim($url, '/');  | 
                                                        |
| 33 | +        $removeSlash = function($url) use ($verb) { | 
                                                        |
| 34 | + return $verb . ltrim($url, '/');  | 
                                                        |
| 35 | 35 | };  | 
                                                        
| 36 | 36 | |
| 37 | 37 | return array_map($removeSlash, $this->normalizeInput($url));  | 
                                                        
@@ -37,7 +37,7 @@  | 
                                                    ||
| 37 | 37 | public function __destruct()  | 
                                                        
| 38 | 38 |      { | 
                                                        
| 39 | 39 | $data = $this->validationData;  | 
                                                        
| 40 | -        $modifier = $this->modifier ?: function ($d) { | 
                                                        |
| 40 | +        $modifier = $this->modifier ?: function($d) { | 
                                                        |
| 41 | 41 | return $d;  | 
                                                        
| 42 | 42 | };  | 
                                                        
| 43 | 43 | $this->chain->condition = app(ResponderFactory::class)->validatorCallback($modifier, ...$data);  | 
                                                        
@@ -34,7 +34,7 @@ discard block  | 
                                                    ||
| 34 | 34 |      { | 
                                                        
| 35 | 35 | $gate = $this->defineNewGate($gate);  | 
                                                        
| 36 | 36 | |
| 37 | -        $this->chain->condition = function (...$payload) use ($gate, $parameters) { | 
                                                        |
| 37 | +        $this->chain->condition = function(...$payload) use ($gate, $parameters) { | 
                                                        |
| 38 | 38 | return Gate::allows($gate, (array_merge($parameters, ...$payload)));  | 
                                                        
| 39 | 39 | };  | 
                                                        
| 40 | 40 | |
@@ -48,8 +48,8 @@ discard block  | 
                                                    ||
| 48 | 48 | |
| 49 | 49 | public function thisMethodShouldAllow($callback, array $parameters = []): Otherwise  | 
                                                        
| 50 | 50 |      { | 
                                                        
| 51 | -        $this->chain->condition = function (...$payload) use ($callback, $parameters) { | 
                                                        |
| 52 | - return (bool) app()->call($callback, array_merge($parameters, ...$payload));  | 
                                                        |
| 51 | +        $this->chain->condition = function(...$payload) use ($callback, $parameters) { | 
                                                        |
| 52 | + return (bool)app()->call($callback, array_merge($parameters, ...$payload));  | 
                                                        |
| 53 | 53 | };  | 
                                                        
| 54 | 54 | |
| 55 | 55 | return app(Otherwise::class);  | 
                                                        
@@ -57,8 +57,8 @@ discard block  | 
                                                    ||
| 57 | 57 | |
| 58 | 58 | public function thisValueShouldAllow($value): Otherwise  | 
                                                        
| 59 | 59 |      { | 
                                                        
| 60 | -        $this->chain->condition = function () use ($value) { | 
                                                        |
| 61 | - return (bool) $value;  | 
                                                        |
| 60 | +        $this->chain->condition = function() use ($value) { | 
                                                        |
| 61 | + return (bool)$value;  | 
                                                        |
| 62 | 62 | };  | 
                                                        
| 63 | 63 | |
| 64 | 64 | return app(Otherwise::class);  | 
                                                        
@@ -66,7 +66,7 @@ discard block  | 
                                                    ||
| 66 | 66 | |
| 67 | 67 | public function youShouldBeGuest($guard = null): Otherwise  | 
                                                        
| 68 | 68 |      { | 
                                                        
| 69 | -        $this->chain->condition = function () use ($guard) { | 
                                                        |
| 69 | +        $this->chain->condition = function() use ($guard) { | 
                                                        |
| 70 | 70 | return auth($guard)->guest();  | 
                                                        
| 71 | 71 | };  | 
                                                        
| 72 | 72 | |
@@ -75,7 +75,7 @@ discard block  | 
                                                    ||
| 75 | 75 | |
| 76 | 76 | public function sessionShouldHave($key): Otherwise  | 
                                                        
| 77 | 77 |      { | 
                                                        
| 78 | -        $this->chain->condition = function () use ($key) { | 
                                                        |
| 78 | +        $this->chain->condition = function() use ($key) { | 
                                                        |
| 79 | 79 | return session()->has($key);  | 
                                                        
| 80 | 80 | };  | 
                                                        
| 81 | 81 | |
@@ -84,7 +84,7 @@ discard block  | 
                                                    ||
| 84 | 84 | |
| 85 | 85 | public function youShouldBeLoggedIn($guard = null): Otherwise  | 
                                                        
| 86 | 86 |      { | 
                                                        
| 87 | -        $this->chain->condition = function () use ($guard) { | 
                                                        |
| 87 | +        $this->chain->condition = function() use ($guard) { | 
                                                        |
| 88 | 88 | return auth($guard)->check();  | 
                                                        
| 89 | 89 | };  | 
                                                        
| 90 | 90 | |
@@ -93,7 +93,7 @@ discard block  | 
                                                    ||
| 93 | 93 | |
| 94 | 94 | public function youShouldAlways(): Reactions  | 
                                                        
| 95 | 95 |      { | 
                                                        
| 96 | -        $this->chain->condition = function () { | 
                                                        |
| 96 | +        $this->chain->condition = function() { | 
                                                        |
| 97 | 97 | return false;  | 
                                                        
| 98 | 98 | };  | 
                                                        
| 99 | 99 | |
@@ -56,7 +56,7 @@  | 
                                                    ||
| 56 | 56 | */  | 
                                                        
| 57 | 57 | private function turn($key, callable $closure = null)  | 
                                                        
| 58 | 58 |      { | 
                                                        
| 59 | - $key = 'heyman_ignore_'.$key;  | 
                                                        |
| 59 | + $key = 'heyman_ignore_' . $key;  | 
                                                        |
| 60 | 60 | |
| 61 | 61 | $current = config($key);  | 
                                                        
| 62 | 62 | $this->changeMode($key);  | 
                                                        
@@ -28,7 +28,7 @@  | 
                                                    ||
| 28 | 28 |      { | 
                                                        
| 29 | 29 | $views = $this->normalizeInput($views);  | 
                                                        
| 30 | 30 | |
| 31 | -        array_walk($views, function ($view) { | 
                                                        |
| 31 | +        array_walk($views, function($view) { | 
                                                        |
| 32 | 32 | $this->checkViewExists($view);  | 
                                                        
| 33 | 33 | });  | 
                                                        
| 34 | 34 | |