@@ -31,7 +31,7 @@ |
||
31 | 31 | $args = $this->normalizeInput($args); |
32 | 32 | |
33 | 33 | if (in_array($method, ['aboutRoute', 'aboutAction', 'aboutUrl'])) { |
34 | - $args = resolve(RouteNormalizer::class)->{'normalize'.ltrim($method, 'about')}($args); |
|
34 | + $args = resolve(RouteNormalizer::class)->{'normalize' . ltrim($method, 'about')}($args); |
|
35 | 35 | |
36 | 36 | return resolve('heyman.chains')->forgetAbout(RouteEventListener::class, $args); |
37 | 37 | } |
@@ -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 | $condition = $this->methods[$method]; |
19 | 19 | |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | |
38 | 38 | public function alias(string $currentName, string $newName) |
39 | 39 | { |
40 | - if (isset($this->methods[$currentName]) && ! isset($this->aliases[$newName])) { |
|
40 | + if (isset($this->methods[$currentName]) && !isset($this->aliases[$newName])) { |
|
41 | 41 | $this->aliases[$newName] = $currentName; |
42 | 42 | } |
43 | 43 | } |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | |
27 | 27 | public function checkPoint(string $pointName) |
28 | 28 | { |
29 | - event('heyman_checkpoint_'.$pointName); |
|
29 | + event('heyman_checkpoint_' . $pointName); |
|
30 | 30 | } |
31 | 31 | |
32 | 32 | public function aliasCondition(string $currentName, string $newName) |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | */ |
50 | 50 | private function writeDebugInfo($debugTrace) |
51 | 51 | { |
52 | - if (config('app.debug') && ! app()->environment('production')) { |
|
52 | + if (config('app.debug') && !app()->environment('production')) { |
|
53 | 53 | $info = array_only($debugTrace, ['file', 'line', 'args']); |
54 | 54 | resolve('heyman.chain')->set('debugInfo', $info); |
55 | 55 | } |
@@ -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]; |
@@ -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 |
@@ -13,12 +13,12 @@ discard block |
||
13 | 13 | */ |
14 | 14 | public function normalizeAction($actions): array |
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); |
@@ -32,8 +32,8 @@ discard block |
||
32 | 32 | */ |
33 | 33 | public function normalizeUrl($urls, $verb = 'GET'): array |
34 | 34 | { |
35 | - $removeSlash = function ($url) use ($verb) { |
|
36 | - return $verb.ltrim($url, '/'); |
|
35 | + $removeSlash = function($url) use ($verb) { |
|
36 | + return $verb . ltrim($url, '/'); |
|
37 | 37 | }; |
38 | 38 | |
39 | 39 | return array_map($removeSlash, $urls); |
@@ -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 | } |
@@ -6,17 +6,17 @@ |
||
6 | 6 | { |
7 | 7 | public static function register() |
8 | 8 | { |
9 | - if (! app()->offsetExists('debugbar')) { |
|
9 | + if (!app()->offsetExists('debugbar')) { |
|
10 | 10 | return; |
11 | 11 | } |
12 | 12 | |
13 | - app()->singleton('heyman.debugger', function () { |
|
13 | + app()->singleton('heyman.debugger', function() { |
|
14 | 14 | return new \DebugBar\DataCollector\MessagesCollector('HeyMan'); |
15 | 15 | }); |
16 | 16 | |
17 | 17 | app()->make('debugbar')->addCollector(app('heyman.debugger')); |
18 | 18 | |
19 | - \Event::listen('heyman_reaction_is_happening', function (...$debug) { |
|
19 | + \Event::listen('heyman_reaction_is_happening', function(...$debug) { |
|
20 | 20 | app()['heyman_reaction_is_happened_in_debug'] = $debug; |
21 | 21 | }); |
22 | 22 | } |
@@ -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 | } |