| @@ -31,9 +31,9 @@ | ||
| 31 | 31 | private function normalizeView(array $views): array | 
| 32 | 32 |      { | 
| 33 | 33 | $views = $this->normalizeInput($views); | 
| 34 | -        $mapper = function ($view) { | |
| 34 | +        $mapper = function($view) { | |
| 35 | 35 | $this->checkViewExists($view); | 
| 36 | - return 'creating: '.\Illuminate\View\ViewName::normalize($view); | |
| 36 | + return 'creating: ' . \Illuminate\View\ViewName::normalize($view); | |
| 37 | 37 | }; | 
| 38 | 38 | |
| 39 | 39 | return array_map($mapper, $views); | 
| @@ -73,7 +73,7 @@ | ||
| 73 | 73 | } | 
| 74 | 74 | } | 
| 75 | 75 | |
| 76 | -        return function () { | |
| 76 | +        return function() { | |
| 77 | 77 | }; | 
| 78 | 78 | } | 
| 79 | 79 | } | 
| @@ -13,7 +13,7 @@ discard block | ||
| 13 | 13 | */ | 
| 14 | 14 | public function whenYouVisitUrl(...$url) | 
| 15 | 15 |      { | 
| 16 | -        $removeSlash = function ($url) { | |
| 16 | +        $removeSlash = function($url) { | |
| 17 | 17 | return ltrim($url, '/'); | 
| 18 | 18 | }; | 
| 19 | 19 | |
| @@ -39,12 +39,12 @@ discard block | ||
| 39 | 39 | */ | 
| 40 | 40 | public function whenYouCallAction(...$action) | 
| 41 | 41 |      { | 
| 42 | -        $addNamespace = function ($action) { | |
| 42 | +        $addNamespace = function($action) { | |
| 43 | 43 |              if ($action = ltrim($action, '\\')) { | 
| 44 | 44 | return $action; | 
| 45 | 45 | } | 
| 46 | 46 | |
| 47 | - return app()->getNamespace().'\\Http\\Controllers\\'.$action; | |
| 47 | + return app()->getNamespace() . '\\Http\\Controllers\\' . $action; | |
| 48 | 48 | }; | 
| 49 | 49 | |
| 50 | 50 | $action = array_map($addNamespace, $this->normalizeInput($action)); | 
| @@ -9,7 +9,7 @@ discard block | ||
| 9 | 9 |  { | 
| 10 | 10 | public function authorizeMatchedRoutes() | 
| 11 | 11 |      { | 
| 12 | -        Route::matched(function (RouteMatched $eventObj) { | |
| 12 | +        Route::matched(function(RouteMatched $eventObj) { | |
| 13 | 13 | $route = $eventObj->route; | 
| 14 | 14 |              if ($eventObj->request->method() === 'GET') { | 
| 15 | 15 | $this->authorizeUrls($route->uri); | 
| @@ -55,7 +55,7 @@ discard block | ||
| 55 | 55 | */ | 
| 56 | 56 | private function setGuardFor($method, $key) | 
| 57 | 57 |      { | 
| 58 | - $method = 'get'.$method; | |
| 58 | + $method = 'get' . $method; | |
| 59 | 59 |          app(RouteConditionApplier::class)->{$method}($key)(); | 
| 60 | 60 | } | 
| 61 | 61 | } | 
| @@ -17,7 +17,7 @@ discard block | ||
| 17 | 17 |      { | 
| 18 | 18 | $gate = $this->defineNewGate($gate); | 
| 19 | 19 | |
| 20 | -        $this->predicate = function (...$payload) use ($gate, $parameters) { | |
| 20 | +        $this->predicate = function(...$payload) use ($gate, $parameters) { | |
| 21 | 21 | return Gate::allows($gate, (array_merge($parameters, ...$payload))); | 
| 22 | 22 | }; | 
| 23 | 23 | |
| @@ -31,8 +31,8 @@ discard block | ||
| 31 | 31 | |
| 32 | 32 | public function thisMethodShouldAllow($callback, array $parameters = []) | 
| 33 | 33 |      { | 
| 34 | -        $this->predicate = function (...$payload) use ($callback, $parameters) { | |
| 35 | - return (bool) app()->call($callback, array_merge($parameters, ...$payload)); | |
| 34 | +        $this->predicate = function(...$payload) use ($callback, $parameters) { | |
| 35 | + return (bool)app()->call($callback, array_merge($parameters, ...$payload)); | |
| 36 | 36 | }; | 
| 37 | 37 | |
| 38 | 38 | return new Otherwise(); | 
| @@ -40,8 +40,8 @@ discard block | ||
| 40 | 40 | |
| 41 | 41 | public function thisValueShouldAllow($value) | 
| 42 | 42 |      { | 
| 43 | -        $this->predicate = function () use ($value) { | |
| 44 | - return (bool) $value; | |
| 43 | +        $this->predicate = function() use ($value) { | |
| 44 | + return (bool)$value; | |
| 45 | 45 | }; | 
| 46 | 46 | |
| 47 | 47 | return new Otherwise(); | 
| @@ -49,7 +49,7 @@ discard block | ||
| 49 | 49 | |
| 50 | 50 | public function youShouldBeGuest() | 
| 51 | 51 |      { | 
| 52 | -        $this->predicate = function () { | |
| 52 | +        $this->predicate = function() { | |
| 53 | 53 | return auth()->guest(); | 
| 54 | 54 | }; | 
| 55 | 55 | |
| @@ -58,7 +58,7 @@ discard block | ||
| 58 | 58 | |
| 59 | 59 | public function sessionShouldHave($key) | 
| 60 | 60 |      { | 
| 61 | -        $this->predicate = function () use ($key) { | |
| 61 | +        $this->predicate = function() use ($key) { | |
| 62 | 62 | return session()->has($key); | 
| 63 | 63 | }; | 
| 64 | 64 | |
| @@ -67,7 +67,7 @@ discard block | ||
| 67 | 67 | |
| 68 | 68 | public function youShouldBeLoggedIn() | 
| 69 | 69 |      { | 
| 70 | -        $this->predicate = function () { | |
| 70 | +        $this->predicate = function() { | |
| 71 | 71 | return auth()->check(); | 
| 72 | 72 | }; | 
| 73 | 73 | |
| @@ -76,7 +76,7 @@ discard block | ||
| 76 | 76 | |
| 77 | 77 | public function immediately() | 
| 78 | 78 |      { | 
| 79 | -        $this->predicate = function () { | |
| 79 | +        $this->predicate = function() { | |
| 80 | 80 | return false; | 
| 81 | 81 | }; | 
| 82 | 82 | |
| @@ -28,7 +28,7 @@ discard block | ||
| 28 | 28 | */ | 
| 29 | 29 | private function exceptionCallback($e, $cb): \Closure | 
| 30 | 30 |      { | 
| 31 | -        return function (...$f) use ($e, $cb) { | |
| 31 | +        return function(...$f) use ($e, $cb) { | |
| 32 | 32 |              if (!$cb($f)) { | 
| 33 | 33 | throw $e; | 
| 34 | 34 | } | 
| @@ -43,7 +43,7 @@ discard block | ||
| 43 | 43 | */ | 
| 44 | 44 | private function responseCallback($resp, $cb): \Closure | 
| 45 | 45 |      { | 
| 46 | -        return function (...$f) use ($resp, $cb) { | |
| 46 | +        return function(...$f) use ($resp, $cb) { | |
| 47 | 47 |              if (!$cb($f)) { | 
| 48 | 48 | $respObj = response(); | 
| 49 | 49 |                  foreach ($resp as $call) { |