Completed
Push — master ( ad0dc3...27a97f )
by Iman
07:58
created
src/RouteMatchListener.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,11 +10,11 @@
 block discarded – undo
10 10
 {
11 11
     public function authorizeMatchedRoutes()
12 12
     {
13
-        Route::matched(function (RouteMatched $eventObj) {
13
+        Route::matched(function(RouteMatched $eventObj) {
14 14
             $matchedRoute = [
15 15
                 $eventObj->route->getName(),
16 16
                 $eventObj->route->getActionName(),
17
-                $eventObj->request->method().$eventObj->route->uri,
17
+                $eventObj->request->method() . $eventObj->route->uri,
18 18
             ];
19 19
 
20 20
             $closures = app(RouterEventManager::class)->findMatchingCallbacks($matchedRoute);
Please login to merge, or discard this patch.
src/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/Hooks/ViewHooks.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
     {
29 29
         $views = $this->normalizeInput($views);
30 30
 
31
-        array_walk($views, function ($view) {
31
+        array_walk($views, function($view) {
32 32
             $this->checkViewExists($view);
33 33
         });
34 34
 
Please login to merge, or discard this patch.
src/YouShouldHave.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
     {
34 34
         $gate = $this->defineNewGate($gate);
35 35
 
36
-        $this->chain->predicate = function (...$payload) use ($gate, $parameters) {
36
+        $this->chain->predicate = function(...$payload) use ($gate, $parameters) {
37 37
             return Gate::allows($gate, (array_merge($parameters, ...$payload)));
38 38
         };
39 39
 
@@ -47,8 +47,8 @@  discard block
 block discarded – undo
47 47
 
48 48
     public function thisMethodShouldAllow($callback, array $parameters = []): Otherwise
49 49
     {
50
-        $this->chain->predicate = function (...$payload) use ($callback, $parameters) {
51
-            return (bool) app()->call($callback, array_merge($parameters, ...$payload));
50
+        $this->chain->predicate = function(...$payload) use ($callback, $parameters) {
51
+            return (bool)app()->call($callback, array_merge($parameters, ...$payload));
52 52
         };
53 53
 
54 54
         return app(Otherwise::class);
@@ -56,8 +56,8 @@  discard block
 block discarded – undo
56 56
 
57 57
     public function thisValueShouldAllow($value): Otherwise
58 58
     {
59
-        $this->chain->predicate = function () use ($value) {
60
-            return (bool) $value;
59
+        $this->chain->predicate = function() use ($value) {
60
+            return (bool)$value;
61 61
         };
62 62
 
63 63
         return app(Otherwise::class);
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 
66 66
     public function youShouldBeGuest($guard = null): Otherwise
67 67
     {
68
-        $this->chain->predicate = function () use ($guard) {
68
+        $this->chain->predicate = function() use ($guard) {
69 69
             return auth($guard)->guest();
70 70
         };
71 71
 
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 
75 75
     public function sessionShouldHave($key): Otherwise
76 76
     {
77
-        $this->chain->predicate = function () use ($key) {
77
+        $this->chain->predicate = function() use ($key) {
78 78
             return session()->has($key);
79 79
         };
80 80
 
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 
84 84
     public function youShouldBeLoggedIn($guard = null): Otherwise
85 85
     {
86
-        $this->chain->predicate = function () use ($guard) {
86
+        $this->chain->predicate = function() use ($guard) {
87 87
             return auth($guard)->check();
88 88
         };
89 89
 
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 
93 93
     public function youShouldAlways(): Reactions
94 94
     {
95
-        $this->chain->predicate = function () {
95
+        $this->chain->predicate = function() {
96 96
             return false;
97 97
         };
98 98
 
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
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
     public function __destruct()
38 38
     {
39 39
         $data = $this->validationData;
40
-        $modifier = $this->modifier ?: function ($d) {
40
+        $modifier = $this->modifier ?: function($d) {
41 41
             return $d;
42 42
         };
43 43
         $this->chain->predicate = app(ResponderFactory::class)->validatorCallback($modifier, ...$data);
Please login to merge, or discard this patch.
src/Normilizers/ActionNormalizer.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -11,12 +11,12 @@  discard block
 block discarded – undo
11 11
      */
12 12
     private function normalizeAction($action): array
13 13
     {
14
-        $addNamespace = function ($action) {
14
+        $addNamespace = function($action) {
15 15
             if ($action = ltrim($action, '\\')) {
16 16
                 return $action;
17 17
             }
18 18
 
19
-            return app()->getNamespace().'\\Http\\Controllers\\'.$action;
19
+            return app()->getNamespace() . '\\Http\\Controllers\\' . $action;
20 20
         };
21 21
 
22 22
         return array_map($addNamespace, $this->normalizeInput($action));
@@ -30,8 +30,8 @@  discard block
 block discarded – undo
30 30
      */
31 31
     private function normalizeUrl($url, $verb): array
32 32
     {
33
-        $removeSlash = function ($url) use ($verb) {
34
-            return $verb.ltrim($url, '/');
33
+        $removeSlash = function($url) use ($verb) {
34
+            return $verb . ltrim($url, '/');
35 35
         };
36 36
 
37 37
         return array_map($removeSlash, $this->normalizeInput($url));
Please login to merge, or discard this patch.
src/Consider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
      */
52 52
     private function turn($key, callable $closure = null)
53 53
     {
54
-        $key = 'heyman_ignore_'.$key;
54
+        $key = 'heyman_ignore_' . $key;
55 55
 
56 56
         $current = config($key);
57 57
         config()->set($key, [
Please login to merge, or discard this patch.
src/Chain.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -45,14 +45,14 @@  discard block
 block discarded – undo
45 45
 
46 46
     public function addAfterCall($callback, $parameters)
47 47
     {
48
-        $this->beforeResponse[] = function () use ($callback, $parameters) {
48
+        $this->beforeResponse[] = function() use ($callback, $parameters) {
49 49
             app()->call($callback, $parameters);
50 50
         };
51 51
     }
52 52
 
53 53
     public function eventFire($event, array $payload, bool $halt)
54 54
     {
55
-        $this->beforeResponse[] = function () use ($event, $payload, $halt) {
55
+        $this->beforeResponse[] = function() use ($event, $payload, $halt) {
56 56
             app('events')->dispatch($event, $payload, $halt);
57 57
         };
58 58
     }
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
         $calls = $this->beforeResponse;
75 75
         $this->beforeResponse = [];
76 76
 
77
-        return function () use ($calls) {
77
+        return function() use ($calls) {
78 78
             foreach ($calls as $call) {
79 79
                 $call();
80 80
             }
Please login to merge, or discard this patch.
src/Reactions/ReactionFactory.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
         $reaction = $this->makeReaction();
30 30
         $cb = $this->chain->predicate;
31 31
 
32
-        return function (...$f) use ($cb, $reaction) {
32
+        return function(...$f) use ($cb, $reaction) {
33 33
             if (!$cb($f)) {
34 34
                 $reaction();
35 35
             }
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
         $responder = app(ResponderFactory::class)->make();
42 42
         $beforeResponse = $this->chain->beforeResponse();
43 43
 
44
-        return function () use ($beforeResponse, $responder) {
44
+        return function() use ($beforeResponse, $responder) {
45 45
             $beforeResponse();
46 46
             $responder();
47 47
         };
Please login to merge, or discard this patch.