Completed
Push — master ( 17c0c5...99eb02 )
by Iman
05:05
created
src/Conditions/Traits/Callbacks.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -11,15 +11,15 @@
 block discarded – undo
11 11
 
12 12
     public function methodAllows($callback, array $parameters = [])
13 13
     {
14
-        return function (...$payload) use ($callback, $parameters) {
15
-            return (bool) app()->call($callback, array_merge($parameters, ...$payload));
14
+        return function(...$payload) use ($callback, $parameters) {
15
+            return (bool)app()->call($callback, array_merge($parameters, ...$payload));
16 16
         };
17 17
     }
18 18
 
19 19
     public function valueAllows($value)
20 20
     {
21
-        return function () use ($value) {
22
-            return (bool) $value;
21
+        return function() use ($value) {
22
+            return (bool)$value;
23 23
         };
24 24
     }
25 25
 }
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/Boot/DebugbarIntergrator.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -6,19 +6,19 @@
 block discarded – undo
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) {
20
-            resolve('heyman.debugger')->addMessage('HeyMan Rule Matched in file: '.$debug[0]);
21
-            resolve('heyman.debugger')->addMessage('on line: '.$debug[1]);
19
+        \Event::listen('heyman_reaction_is_happening', function(...$debug) {
20
+            resolve('heyman.debugger')->addMessage('HeyMan Rule Matched in file: ' . $debug[0]);
21
+            resolve('heyman.debugger')->addMessage('on line: ' . $debug[1]);
22 22
             resolve('heyman.debugger')->addMessage($debug[2]);
23 23
         });
24 24
     }
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/WatchingStrategies/Routes/RouteEventListener.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
      */
16 16
     public function startWatching($chainData)
17 17
     {
18
-        Route::matched(function (RouteMatched $eventObj) use ($chainData) {
18
+        Route::matched(function(RouteMatched $eventObj) use ($chainData) {
19 19
             $matchedRoute = $this->getMatchedRouteInto($eventObj);
20 20
             $matchedCallbacks = [];
21 21
             foreach ($matchedRoute as $info) {
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
         $matchedRoute = [
50 50
             $eventObj->route->getName(),
51 51
             $eventObj->route->getActionName(),
52
-            $eventObj->request->method().$eventObj->route->uri,
52
+            $eventObj->request->method() . $eventObj->route->uri,
53 53
         ];
54 54
 
55 55
         return array_filter($matchedRoute);
Please login to merge, or discard this patch.
src/Forget.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
src/Conditions/ConditionsFacade.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 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
 block discarded – undo
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
     }
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
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
     {
20 20
         resolve('heyman.chain')->startChain();
21 21
 
22
-        if (config('app.debug') && ! app()->environment('production')) {
22
+        if (config('app.debug') && !app()->environment('production')) {
23 23
             $info = array_only(debug_backtrace(DEBUG_BACKTRACE_PROVIDE_OBJECT, 2)[1], ['file', 'line', 'args']);
24 24
             resolve('heyman.chain')->set('debugInfo', $info);
25 25
         }
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 
30 30
     public function checkPoint(string $pointName)
31 31
     {
32
-        event('heyman_checkpoint_'.$pointName);
32
+        event('heyman_checkpoint_' . $pointName);
33 33
     }
34 34
 
35 35
     public function aliasCondition(string $currentName, string $newName)
Please login to merge, or discard this patch.