@@ -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; |
@@ -19,20 +19,20 @@ discard block |
||
19 | 19 | |
20 | 20 | protected function abort($args): \Closure |
21 | 21 | { |
22 | - return function () use ($args) { |
|
22 | + return function() use ($args) { |
|
23 | 23 | abort(...$args); |
24 | 24 | }; |
25 | 25 | } |
26 | 26 | |
27 | 27 | protected function nothing(): \Closure |
28 | 28 | { |
29 | - return function () { |
|
29 | + return function() { |
|
30 | 30 | }; |
31 | 31 | } |
32 | 32 | |
33 | 33 | protected function exception(array $e): \Closure |
34 | 34 | { |
35 | - return function () use ($e) { |
|
35 | + return function() use ($e) { |
|
36 | 36 | $exClass = $e[0]; |
37 | 37 | $message = $e[1]; |
38 | 38 | |
@@ -42,21 +42,21 @@ discard block |
||
42 | 42 | |
43 | 43 | protected function response(...$resp): \Closure |
44 | 44 | { |
45 | - return function () use ($resp) { |
|
45 | + return function() use ($resp) { |
|
46 | 46 | $this->sendResponse($resp, response()); |
47 | 47 | }; |
48 | 48 | } |
49 | 49 | |
50 | 50 | protected function redirect(...$resp): \Closure |
51 | 51 | { |
52 | - return function () use ($resp) { |
|
52 | + return function() use ($resp) { |
|
53 | 53 | $this->sendResponse($resp, redirect()); |
54 | 54 | }; |
55 | 55 | } |
56 | 56 | |
57 | 57 | protected function respondFrom($method): \Closure |
58 | 58 | { |
59 | - return function () use ($method) { |
|
59 | + return function() use ($method) { |
|
60 | 60 | throw new HttpResponseException(app()->call(...$method)); |
61 | 61 | }; |
62 | 62 | } |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | |
74 | 74 | public function validatorCallback($modifier, $rules, array $messages = [], array $customAttributes = []): \Closure |
75 | 75 | { |
76 | - $validator = function () use ($modifier, $rules, $messages, $customAttributes) { |
|
76 | + $validator = function() use ($modifier, $rules, $messages, $customAttributes) { |
|
77 | 77 | if (is_callable($rules)) { |
78 | 78 | $rules = call_user_func($rules); |
79 | 79 | } |
@@ -21,7 +21,7 @@ |
||
21 | 21 | public function __destruct() |
22 | 22 | { |
23 | 23 | $data = $this->validationData; |
24 | - $modifier = $this->modifier ?: function ($args) { |
|
24 | + $modifier = $this->modifier ?: function($args) { |
|
25 | 25 | return $args; |
26 | 26 | }; |
27 | 27 | $chain = resolve('heyman.chain'); |