@@ -11,7 +11,7 @@ |
||
11 | 11 | */ |
12 | 12 | public function normalize($method, $params) |
13 | 13 | { |
14 | - array_walk($params, function ($view) { |
|
14 | + array_walk($params, function($view) { |
|
15 | 15 | $this->checkViewExists($view); |
16 | 16 | }); |
17 | 17 |
@@ -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 | } |
@@ -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 | } |
@@ -9,20 +9,20 @@ |
||
9 | 9 | { |
10 | 10 | public static function register() |
11 | 11 | { |
12 | - if (! app()->offsetExists('debugbar')) { |
|
12 | + if (!app()->offsetExists('debugbar')) { |
|
13 | 13 | return; |
14 | 14 | } |
15 | 15 | |
16 | - app()->singleton('heyman.debugger', function () { |
|
16 | + app()->singleton('heyman.debugger', function() { |
|
17 | 17 | return new MessagesCollector('HeyMan'); |
18 | 18 | }); |
19 | 19 | |
20 | 20 | app()->make('debugbar')->addCollector(app('heyman.debugger')); |
21 | 21 | |
22 | - Event::listen('heyman_reaction_is_happening', function (...$debug) { |
|
22 | + Event::listen('heyman_reaction_is_happening', function(...$debug) { |
|
23 | 23 | app()['heyman_reaction_is_happened_in_debug'] = $debug; |
24 | 24 | resolve('heyman.debugger')->addMessage('HeyMan Rule Matched in file: '); |
25 | - resolve('heyman.debugger')->addMessage($debug[0].' on line: '.$debug[1]); |
|
25 | + resolve('heyman.debugger')->addMessage($debug[0] . ' on line: ' . $debug[1]); |
|
26 | 26 | resolve('heyman.debugger')->addMessage($debug[2]); |
27 | 27 | }); |
28 | 28 | } |
@@ -19,14 +19,14 @@ discard block |
||
19 | 19 | |
20 | 20 | protected function abort($abort): \Closure |
21 | 21 | { |
22 | - return function () use ($abort) { |
|
22 | + return function() use ($abort) { |
|
23 | 23 | abort(...$abort); |
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 | |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | */ |
38 | 38 | protected function exception(array $e): \Closure |
39 | 39 | { |
40 | - return function () use ($e) { |
|
40 | + return function() use ($e) { |
|
41 | 41 | $exClass = $e[0]; |
42 | 42 | $message = $e[1]; |
43 | 43 | |
@@ -52,14 +52,14 @@ discard block |
||
52 | 52 | */ |
53 | 53 | protected function response(...$resp): \Closure |
54 | 54 | { |
55 | - return function () use ($resp) { |
|
55 | + return function() use ($resp) { |
|
56 | 56 | $this->sendResponse($resp, response()); |
57 | 57 | }; |
58 | 58 | } |
59 | 59 | |
60 | 60 | protected function redirect(...$resp): \Closure |
61 | 61 | { |
62 | - return function () use ($resp) { |
|
62 | + return function() use ($resp) { |
|
63 | 63 | $this->sendResponse($resp, redirect()); |
64 | 64 | }; |
65 | 65 | } |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | */ |
74 | 74 | protected function respondFrom($method): \Closure |
75 | 75 | { |
76 | - return function () use ($method) { |
|
76 | + return function() use ($method) { |
|
77 | 77 | throw new HttpResponseException(app()->call(...$method)); |
78 | 78 | }; |
79 | 79 | } |
@@ -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 = call_user_func($rules); |
112 | 112 | } |
@@ -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 exists as a Heyman condition'); |
|
15 | + if (!isset($this->methods[$method])) { |
|
16 | + throw new \BadMethodCallException($method . ' does not exists as a Heyman condition'); |
|
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; |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | |
28 | 28 | public function checkPoint(string $pointName) |
29 | 29 | { |
30 | - event('heyman_checkpoint_'.$pointName); |
|
30 | + event('heyman_checkpoint_' . $pointName); |
|
31 | 31 | } |
32 | 32 | |
33 | 33 | public function aliasCondition(string $currentName, string $newName) |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | */ |
56 | 56 | private function writeDebugInfo($debugTrace) |
57 | 57 | { |
58 | - if (config('app.debug') && ! app()->environment('production')) { |
|
58 | + if (config('app.debug') && !app()->environment('production')) { |
|
59 | 59 | $info = Arr::only($debugTrace, ['file', 'line', 'args']); |
60 | 60 | resolve('heyman.chain')->set('debugInfo', $info); |
61 | 61 | } |
@@ -18,12 +18,12 @@ |
||
18 | 18 | */ |
19 | 19 | public function normalizeAction($actions): array |
20 | 20 | { |
21 | - $addNamespace = function ($action) { |
|
21 | + $addNamespace = function($action) { |
|
22 | 22 | if (Str::startsWith($action, '\\')) { |
23 | 23 | return $action; |
24 | 24 | } |
25 | 25 | |
26 | - return app()->getNamespace().'Http\\Controllers\\'.$action; |
|
26 | + return app()->getNamespace() . 'Http\\Controllers\\' . $action; |
|
27 | 27 | }; |
28 | 28 | |
29 | 29 | return array_map($addNamespace, $actions); |
@@ -20,8 +20,8 @@ |
||
20 | 20 | */ |
21 | 21 | private function normalizeUrl($urls, $verb = 'GET'): array |
22 | 22 | { |
23 | - $removeSlash = function ($url) use ($verb) { |
|
24 | - return $verb.ltrim($url, '/'); |
|
23 | + $removeSlash = function($url) use ($verb) { |
|
24 | + return $verb . ltrim($url, '/'); |
|
25 | 25 | }; |
26 | 26 | |
27 | 27 | return array_map($removeSlash, $urls); |