Passed
Push — master ( 378557...7db6a0 )
by Iman
02:39
created
src/Plugins/WatchingStrategies/Routes/RouteUrlsNormalizer.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,8 +14,8 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
src/Plugins/WatchingStrategies/Routes/MatchedRoute.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
src/Plugins/WatchingStrategies/Routes/RouteEventListener.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/Plugins/WatchingStrategies/Routes/RouteActionNormalizer.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,12 +13,12 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
src/Core/ReactionFactory.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -11,8 +11,8 @@  discard block
 block discarded – undo
11 11
         $reaction = $this->makeReaction();
12 12
         $condition = resolve('heyman.chain')->get('condition');
13 13
 
14
-        return function (...$f) use ($condition, $reaction) {
15
-            if (! $condition($f)) {
14
+        return function(...$f) use ($condition, $reaction) {
15
+            if (!$condition($f)) {
16 16
                 $reaction();
17 17
             }
18 18
         };
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 
30 30
         $responder = resolve(ResponderFactory::class)->make();
31 31
 
32
-        return function () use ($beforeReaction, $responder, $debug, $termination) {
32
+        return function() use ($beforeReaction, $responder, $debug, $termination) {
33 33
             if ($termination) {
34 34
                 app()->terminating($termination);
35 35
             }
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
     {
44 44
         $tasks = $chain->get('beforeReaction') ?? [];
45 45
         $tasks = $this->convertToClosures($tasks);
46
-        $beforeReaction = function () use ($tasks) {
46
+        $beforeReaction = function() use ($tasks) {
47 47
             foreach ($tasks as $task) {
48 48
                 $task();
49 49
             }
@@ -54,16 +54,16 @@  discard block
 block discarded – undo
54 54
 
55 55
     private function convertToClosures($tasks)
56 56
     {
57
-        $map = function ($task) {
57
+        $map = function($task) {
58 58
             $params = $task[0];
59 59
 
60 60
             if ($task[1] == 'event') {
61
-                return function () use ($params) {
61
+                return function() use ($params) {
62 62
                     resolve('events')->dispatch(...$params);
63 63
                 };
64 64
             }
65 65
 
66
-            return function () use ($params) {
66
+            return function() use ($params) {
67 67
                 app()->call(...$params);
68 68
             };
69 69
         };
Please login to merge, or discard this patch.
src/Reactions/Validator.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
     public function otherwise()
19 19
     {
20 20
         $rules = $this->validationData;
21
-        $modifier = $this->modifier ?: function ($args) {
21
+        $modifier = $this->modifier ?: function($args) {
22 22
             return $args;
23 23
         };
24 24
 
@@ -40,9 +40,9 @@  discard block
 block discarded – undo
40 40
             $chain = app('heyman.chain');
41 41
             $condition = $chain->get('condition');
42 42
 
43
-            if (! $condition) {
43
+            if (!$condition) {
44 44
                 $data = $this->validationData;
45
-                $modifier = $this->modifier ?: function ($args) {
45
+                $modifier = $this->modifier ?: function($args) {
46 46
                     return $args;
47 47
                 };
48 48
 
Please login to merge, or discard this patch.
src/Switching/HeyManSwitcher.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,8 +6,8 @@
 block discarded – undo
6 6
 {
7 7
     public function wrapForIgnorance(callable $callback, $key)
8 8
     {
9
-        return function (...$args) use ($callback, $key) {
10
-            if (! config('heyman_ignore_'.$key, false)) {
9
+        return function(...$args) use ($callback, $key) {
10
+            if (!config('heyman_ignore_' . $key, false)) {
11 11
                 $callback(...$args);
12 12
             }
13 13
         };
Please login to merge, or discard this patch.
src/Reactions/ResponderFactory.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -19,20 +19,20 @@  discard block
 block discarded – undo
19 19
 
20 20
     protected function abort($args)
21 21
     {
22
-        return function () use ($args) {
22
+        return function() use ($args) {
23 23
             app()->abort(...$args);
24 24
         };
25 25
     }
26 26
 
27 27
     protected function nothing()
28 28
     {
29
-        return function () {
29
+        return function() {
30 30
         };
31 31
     }
32 32
 
33 33
     protected function exception(array $e)
34 34
     {
35
-        return function () use ($e) {
35
+        return function() use ($e) {
36 36
             $exClass = $e[0];
37 37
             $message = $e[1];
38 38
 
@@ -52,14 +52,14 @@  discard block
 block discarded – undo
52 52
 
53 53
     protected function respondFrom($method)
54 54
     {
55
-        return function () use ($method) {
55
+        return function() use ($method) {
56 56
             throw new HttpResponseException(app()->call(...$method));
57 57
         };
58 58
     }
59 59
 
60 60
     private function sendResponse(array $methodCalls, $func)
61 61
     {
62
-        return function () use ($func, $methodCalls) {
62
+        return function() use ($func, $methodCalls) {
63 63
             $respObj = $func();
64 64
             foreach ($methodCalls as $call) {
65 65
                 [$method, $args] = $call;
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 
73 73
     public function validatorCallback($modifier, $rules)
74 74
     {
75
-        $validator = function () use ($modifier, $rules) {
75
+        $validator = function() use ($modifier, $rules) {
76 76
             $this->makeValidator($modifier, $rules)->validate();
77 77
         };
78 78
 
@@ -81,8 +81,8 @@  discard block
 block discarded – undo
81 81
 
82 82
     public function validationPassesCallback($modifier, $rules)
83 83
     {
84
-        $validator = function () use ($modifier, $rules) {
85
-            return ! $this->makeValidator($modifier, $rules)->fails();
84
+        $validator = function() use ($modifier, $rules) {
85
+            return !$this->makeValidator($modifier, $rules)->fails();
86 86
         };
87 87
 
88 88
         return resolve(HeyManSwitcher::class)->wrapForIgnorance($validator, 'validation');
Please login to merge, or discard this patch.
src/Core/ProxyClass.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -12,8 +12,8 @@  discard block
 block discarded – undo
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
 block discarded – undo
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;
Please login to merge, or discard this patch.