Completed
Push — master ( 3707ab...b1ac4b )
by Iman
04:03
created
src/ListenerFactory.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
     {
61 61
         $this->chain->reset();
62 62
 
63
-        $responder = function () use ($e) {
63
+        $responder = function() use ($e) {
64 64
             $exClass = $e['class'];
65 65
             throw new $exClass($e['message']);
66 66
         };
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
     {
79 79
         $this->chain->reset();
80 80
 
81
-        $responder = function () use ($resp) {
81
+        $responder = function() use ($resp) {
82 82
             $respObj = response();
83 83
             foreach ($resp as $call) {
84 84
                 list($method, $args) = $call;
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
     {
95 95
         $this->chain->reset();
96 96
 
97
-        $responder = function () use ($resp) {
97
+        $responder = function() use ($resp) {
98 98
             $respObj = redirect();
99 99
             foreach ($resp as $call) {
100 100
                 list($method, $args) = $call;
@@ -117,9 +117,9 @@  discard block
 block discarded – undo
117 117
         $calls = $this->caller;
118 118
 
119 119
 
120
-        $this->caller = $this->dispatcher = function () {
120
+        $this->caller = $this->dispatcher = function() {
121 121
         };
122
-        return function (...$f) use ($responder, $cb, $dispatcher, $calls) {
122
+        return function(...$f) use ($responder, $cb, $dispatcher, $calls) {
123 123
             if ($cb($f)) {
124 124
                 return true;
125 125
             }
@@ -134,12 +134,12 @@  discard block
 block discarded – undo
134 134
     {
135 135
         $events = $this->chain->events;
136 136
 
137
-        if (! $events) {
138
-            return $this->dispatcher = function () {
137
+        if (!$events) {
138
+            return $this->dispatcher = function() {
139 139
             };
140 140
         }
141 141
 
142
-        return $this->dispatcher = function () use ($events) {
142
+        return $this->dispatcher = function() use ($events) {
143 143
             foreach ($events as $event) {
144 144
                 app('events')->dispatch(...$event);
145 145
             }
@@ -150,12 +150,12 @@  discard block
 block discarded – undo
150 150
     {
151 151
         $calls = $this->chain->calls;
152 152
 
153
-        if (! $calls) {
154
-            return $this->caller = function () {
153
+        if (!$calls) {
154
+            return $this->caller = function() {
155 155
             };
156 156
         }
157 157
 
158
-        return $this->caller = function () use ($calls) {
158
+        return $this->caller = function() use ($calls) {
159 159
             foreach ($calls as $call) {
160 160
                 app()->call(...$call);
161 161
             }
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
     private function abortCallback($abort, $cb)
166 166
     {
167 167
         $this->chain->reset();
168
-        $responder = function () use ($abort) {
168
+        $responder = function() use ($abort) {
169 169
             abort(...$abort);
170 170
         };
171 171
 
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)
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(): Otherwise
67 67
     {
68
-        $this->chain->predicate = function () {
68
+        $this->chain->predicate = function() {
69 69
             return auth()->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(): Otherwise
85 85
     {
86
-        $this->chain->predicate = function () {
86
+        $this->chain->predicate = function() {
87 87
             return auth()->check();
88 88
         };
89 89
 
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 
93 93
     public function immediately()
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/Actions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
 
56 56
     public function afterFiringEvent($event, $payload = [], $halt = false)
57 57
     {
58
-        $this->chain->eventFire($event, $payload , $halt);
58
+        $this->chain->eventFire($event, $payload, $halt);
59 59
 
60 60
         return $this;
61 61
     }
Please login to merge, or discard this patch.