Passed
Push — master ( 1ff8c3...d57d17 )
by Iman
03:06 queued 10s
created
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/ResponderFactory.php 1 patch
Spacing   +9 added lines, -9 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): \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
 block discarded – undo
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
 block discarded – undo
73 73
 
74 74
     public function validatorCallback($modifier, $rules)
75 75
     {
76
-        $validator = function () use ($modifier, $rules) {
76
+        $validator = function() use ($modifier, $rules) {
77 77
             $this->makeValidator($modifier, $rules)->validate();
78 78
         };
79 79
 
@@ -82,9 +82,9 @@  discard block
 block discarded – undo
82 82
 
83 83
     public function validationPassesCallback($modifier, $rules)
84 84
     {
85
-        $validator = function () use ($modifier, $rules) {
85
+        $validator = function() use ($modifier, $rules) {
86 86
 
87
-            return ! $this->makeValidator($modifier, $rules)->fails();
87
+            return !$this->makeValidator($modifier, $rules)->fails();
88 88
         };
89 89
 
90 90
         return resolve(HeyManSwitcher::class)->wrapForIgnorance($validator, 'validation');
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.