Completed
Push — master ( c45904...04afc3 )
by Iman
03:46
created
src/Switching/Consider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
      */
57 57
     private function turn($key, callable $closure = null)
58 58
     {
59
-        $key = 'heyman_ignore_'.$key;
59
+        $key = 'heyman_ignore_' . $key;
60 60
 
61 61
         $current = config($key);
62 62
         $this->changeMode($key);
Please login to merge, or discard this patch.
src/helpers.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (! function_exists('resolve')) {
3
+if (!function_exists('resolve')) {
4 4
     /**
5 5
      * Resolve a service from the container.
6 6
      *
Please login to merge, or discard this patch.
src/Reactions/Validator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
     public function __destruct()
30 30
     {
31 31
         $data = $this->validationData;
32
-        $modifier = $this->modifier ?: function ($d) {
32
+        $modifier = $this->modifier ?: function($d) {
33 33
             return $d;
34 34
         };
35 35
         $chain = resolve('heyman.chain');
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): \Closure
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/ReactionFactory.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -12,8 +12,8 @@  discard block
 block discarded – undo
12 12
         $reaction = $this->makeReaction();
13 13
         $condition = resolve('heyman.chain')->get('condition');
14 14
 
15
-        return function (...$f) use ($condition, $reaction) {
16
-            if (! $condition($f)) {
15
+        return function(...$f) use ($condition, $reaction) {
16
+            if (!$condition($f)) {
17 17
                 $reaction();
18 18
             }
19 19
         };
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 
31 31
         $responder = resolve(ResponderFactory::class)->make();
32 32
 
33
-        return function () use ($beforeReaction, $responder, $debug, $termination) {
33
+        return function() use ($beforeReaction, $responder, $debug, $termination) {
34 34
             if ($termination) {
35 35
                 app()->terminating($termination);
36 36
             }
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
     {
50 50
         $tasks = $chain->get('beforeReaction') ?? [];
51 51
         $tasks = $this->convertToClosures($tasks);
52
-        $beforeReaction = function () use ($tasks) {
52
+        $beforeReaction = function() use ($tasks) {
53 53
             foreach ($tasks as $task) {
54 54
                 $task();
55 55
             }
@@ -65,16 +65,16 @@  discard block
 block discarded – undo
65 65
      */
66 66
     private function convertToClosures($tasks): array
67 67
     {
68
-        $map = function ($task) {
68
+        $map = function($task) {
69 69
             $params = $task[0];
70 70
 
71 71
             if ($task[1] == 'event') {
72
-                return function () use ($params) {
72
+                return function() use ($params) {
73 73
                     resolve('events')->dispatch(...$params);
74 74
                 };
75 75
             }
76 76
 
77
-            return function () use ($params) {
77
+            return function() use ($params) {
78 78
                 app()->call(...$params);
79 79
             };
80 80
         };
Please login to merge, or discard this patch.
src/Boot/DebugbarIntergrator.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -9,20 +9,20 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/HeyMan.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
src/Reactions/ResponderFactory.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -19,20 +19,20 @@  discard block
 block discarded – undo
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
 
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, 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
             }
Please login to merge, or discard this patch.
src/Plugins/Conditions/Gate.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
     {
11 11
         $gate = $this->defineNewGate($gate);
12 12
 
13
-        return function (...$payload) use ($gate, $parameters) {
13
+        return function(...$payload) use ($gate, $parameters) {
14 14
             return GateFacade::allows($gate, (array_merge($parameters, ...$payload)));
15 15
         };
16 16
     }
Please login to merge, or discard this patch.