@@ -6,14 +6,14 @@ |
||
6 | 6 | { |
7 | 7 | public function beGuest($guard = null) |
8 | 8 | { |
9 | - return function () use ($guard) { |
|
9 | + return function() use ($guard) { |
|
10 | 10 | return auth($guard)->guest(); |
11 | 11 | }; |
12 | 12 | } |
13 | 13 | |
14 | 14 | public function loggedIn($guard = null) |
15 | 15 | { |
16 | - return function () use ($guard) { |
|
16 | + return function() use ($guard) { |
|
17 | 17 | return auth($guard)->check(); |
18 | 18 | }; |
19 | 19 | } |
@@ -6,7 +6,7 @@ |
||
6 | 6 | { |
7 | 7 | public function sessionHas($key) |
8 | 8 | { |
9 | - return function () use ($key) { |
|
9 | + return function() use ($key) { |
|
10 | 10 | return session()->has($key); |
11 | 11 | }; |
12 | 12 | } |
@@ -13,7 +13,7 @@ |
||
13 | 13 | public function normalize($method, $name) |
14 | 14 | { |
15 | 15 | if ($method == 'whenYouReachCheckPoint') { |
16 | - $name[0] = 'heyman_checkpoint_'.$name[0]; |
|
16 | + $name[0] = 'heyman_checkpoint_' . $name[0]; |
|
17 | 17 | } |
18 | 18 | |
19 | 19 | return [$name]; |
@@ -6,7 +6,7 @@ |
||
6 | 6 | { |
7 | 7 | public function normalize($method, $params) |
8 | 8 | { |
9 | - array_walk($params, function ($view) { |
|
9 | + array_walk($params, function($view) { |
|
10 | 10 | $this->checkViewExists($view); |
11 | 11 | }); |
12 | 12 |
@@ -14,8 +14,8 @@ |
||
14 | 14 | |
15 | 15 | private function normalizeUrl($urls, $verb = 'GET') |
16 | 16 | { |
17 | - $removeSlash = function ($url) use ($verb) { |
|
18 | - return $verb.ltrim($url, '/'); |
|
17 | + $removeSlash = function($url) use ($verb) { |
|
18 | + return $verb . ltrim($url, '/'); |
|
19 | 19 | }; |
20 | 20 | |
21 | 21 | return array_map($removeSlash, $urls); |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | $matchedRoute = [ |
60 | 60 | $route->getName(), |
61 | 61 | $route->getActionName(), |
62 | - app('request')->method().$route->uri, |
|
62 | + app('request')->method() . $route->uri, |
|
63 | 63 | ]; |
64 | 64 | |
65 | 65 | return array_filter($matchedRoute); |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | |
68 | 68 | public function terminate($request, $response) |
69 | 69 | { |
70 | - if (! ($debug = app()['heyman_reaction_is_happened_in_debug'] ?? false)) { |
|
70 | + if (!($debug = app()['heyman_reaction_is_happened_in_debug'] ?? false)) { |
|
71 | 71 | return; |
72 | 72 | } |
73 | 73 | |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | private function writeForDebugbar($debug) |
95 | 95 | { |
96 | 96 | resolve('heyman.debugger')->addMessage('HeyMan Rule Matched in file: '); |
97 | - resolve('heyman.debugger')->addMessage($debug[0].' on line: '.$debug[1]); |
|
97 | + resolve('heyman.debugger')->addMessage($debug[0] . ' on line: ' . $debug[1]); |
|
98 | 98 | resolve('heyman.debugger')->addMessage($debug[2]); |
99 | 99 | } |
100 | 100 | } |
@@ -15,7 +15,7 @@ |
||
15 | 15 | public function startWatching($chainData) |
16 | 16 | { |
17 | 17 | MatchedRoute::$chainData = $chainData; |
18 | - Route::matched(function (RouteMatched $eventObj) { |
|
18 | + Route::matched(function(RouteMatched $eventObj) { |
|
19 | 19 | $eventObj->route->middleware(MatchedRoute::class); |
20 | 20 | }); |
21 | 21 | } |
@@ -13,12 +13,12 @@ |
||
13 | 13 | |
14 | 14 | public function normalizeAction($actions) |
15 | 15 | { |
16 | - $addNamespace = function ($action) { |
|
16 | + $addNamespace = function($action) { |
|
17 | 17 | if (Str::startsWith($action, '\\')) { |
18 | 18 | return $action; |
19 | 19 | } |
20 | 20 | |
21 | - return app()->getNamespace().'Http\\Controllers\\'.$action; |
|
21 | + return app()->getNamespace() . 'Http\\Controllers\\' . $action; |
|
22 | 22 | }; |
23 | 23 | |
24 | 24 | return array_map($addNamespace, $actions); |
@@ -12,8 +12,8 @@ discard block |
||
12 | 12 | { |
13 | 13 | $method = $this->aliases[$method] ?? $method; |
14 | 14 | |
15 | - if (! isset($this->methods[$method])) { |
|
16 | - throw new \BadMethodCallException($method.' does not exist'); |
|
15 | + if (!isset($this->methods[$method])) { |
|
16 | + throw new \BadMethodCallException($method . ' does not exist'); |
|
17 | 17 | } |
18 | 18 | |
19 | 19 | $condition = $this->methods[$method]; |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | |
39 | 39 | public function alias(string $currentName, string $newName, $override = true) |
40 | 40 | { |
41 | - if ($override || ! isset($this->aliases[$newName])) { |
|
41 | + if ($override || !isset($this->aliases[$newName])) { |
|
42 | 42 | $this->aliases[$newName] = $currentName; |
43 | 43 | |
44 | 44 | return true; |