Passed
Push — master ( 810608...584580 )
by Iman
09:29
created
src/Reactions/ReactionFactory.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  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) {
15
+        return function(...$f) use ($condition, $reaction) {
16 16
             if (!$condition($f)) {
17 17
                 $reaction();
18 18
             }
@@ -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
             }
@@ -64,16 +64,16 @@  discard block
 block discarded – undo
64 64
      */
65 65
     private function convertToClosures($tasks): array
66 66
     {
67
-        $map = function ($task) {
67
+        $map = function($task) {
68 68
             $params = $task[0];
69 69
 
70 70
             if ($task[1] == 'event') {
71
-                return function () use ($params) {
71
+                return function() use ($params) {
72 72
                     resolve('events')->dispatch(...$params);
73 73
                 };
74 74
             }
75 75
 
76
-            return function () use ($params) {
76
+            return function() use ($params) {
77 77
                 app()->call(...$params);
78 78
             };
79 79
         };
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
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
         $method = ltrim($method, 'about');
43 43
 
44 44
         if (in_array($method, ['Route', 'Action', 'Url'])) {
45
-            $args = resolve(RouteNormalizer::class)->{'normalize'.$method}($args);
45
+            $args = resolve(RouteNormalizer::class)->{'normalize' . $method}($args);
46 46
 
47 47
             return resolve('heyman.chains')->forgetAbout('route', $args);
48 48
         }
Please login to merge, or discard this patch.
src/StartGuarding.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,11 +26,11 @@
 block discarded – undo
26 26
 
27 27
     private function guardRoutes()
28 28
     {
29
-        Route::matched(function (RouteMatched $eventObj) {
29
+        Route::matched(function(RouteMatched $eventObj) {
30 30
             $matchedRoute = [
31 31
                 $eventObj->route->getName(),
32 32
                 $eventObj->route->getActionName(),
33
-                $eventObj->request->method().$eventObj->route->uri,
33
+                $eventObj->request->method() . $eventObj->route->uri,
34 34
             ];
35 35
 
36 36
             $t = resolve('heyman.chains')->data['route'] ?? [];
Please login to merge, or discard this patch.
src/Conditions/ConditionsFacade.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
             return app()->call($this->methods[$method], $param);
13 13
         }
14 14
 
15
-        throw new \BadMethodCallException($method.' does not exists as a condition');
15
+        throw new \BadMethodCallException($method . ' does not exists as a condition');
16 16
     }
17 17
 
18 18
     public function define($methodName, $callable)
Please login to merge, or discard this patch.
src/Conditions/Traits/Callbacks.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -18,15 +18,15 @@
 block discarded – undo
18 18
         // it is not clear why laravel passes the $emptyString as the first parameter here.
19 19
         // check Imanghafoori\HeyMan\Conditions\ConditionsFacade class line 12;
20 20
 
21
-        return function (...$payload) use ($callback, $parameters) {
22
-            return (bool) app()->call($callback, array_merge($parameters, ...$payload));
21
+        return function(...$payload) use ($callback, $parameters) {
22
+            return (bool)app()->call($callback, array_merge($parameters, ...$payload));
23 23
         };
24 24
     }
25 25
 
26 26
     public function valueAllows($value)
27 27
     {
28
-        return function () use ($value) {
29
-            return (bool) $value;
28
+        return function() use ($value) {
29
+            return (bool)$value;
30 30
         };
31 31
     }
32 32
 }
Please login to merge, or discard this patch.
src/Conditions/Traits/Authentication.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,14 +6,14 @@
 block discarded – undo
6 6
 {
7 7
     public function beGuest($guard = null)
8 8
     {
9
-        return function () use ($guard) {
9
+        return function() use ($guard) {
10 10
             return auth($guard)->guest();
11 11
         };
12 12
     }
13 13
 
14 14
     public function loggedIn($guard = null)
15 15
     {
16
-        return function () use ($guard) {
16
+        return function() use ($guard) {
17 17
             return auth($guard)->check();
18 18
         };
19 19
     }
Please login to merge, or discard this patch.
src/Conditions/Traits/Session.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
 {
7 7
     public function sessionHas($key)
8 8
     {
9
-        return function () use ($key) {
9
+        return function() use ($key) {
10 10
             return session()->has($key);
11 11
         };
12 12
     }
Please login to merge, or discard this patch.