@@ -12,15 +12,15 @@ |
||
| 12 | 12 | |
| 13 | 13 | public function thisMethodShouldAllow($callback, array $parameters = []) |
| 14 | 14 | { |
| 15 | - return function (...$payload) use ($callback, $parameters) { |
|
| 16 | - return (bool) app()->call($callback, array_merge($parameters, ...$payload)); |
|
| 15 | + return function(...$payload) use ($callback, $parameters) { |
|
| 16 | + return (bool)app()->call($callback, array_merge($parameters, ...$payload)); |
|
| 17 | 17 | }; |
| 18 | 18 | } |
| 19 | 19 | |
| 20 | 20 | public function thisValueShouldAllow($value) |
| 21 | 21 | { |
| 22 | - return function () use ($value) { |
|
| 23 | - return (bool) $value; |
|
| 22 | + return function() use ($value) { |
|
| 23 | + return (bool)$value; |
|
| 24 | 24 | }; |
| 25 | 25 | } |
| 26 | 26 | } |
| 27 | 27 | \ No newline at end of file |
@@ -10,7 +10,7 @@ |
||
| 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 | } |
@@ -6,14 +6,14 @@ |
||
| 6 | 6 | { |
| 7 | 7 | public function youShouldBeGuest($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 youShouldBeLoggedIn($guard = null) |
| 15 | 15 | { |
| 16 | - return function () use ($guard) { |
|
| 16 | + return function() use ($guard) { |
|
| 17 | 17 | return auth($guard)->check(); |
| 18 | 18 | }; |
| 19 | 19 | } |
@@ -6,7 +6,7 @@ |
||
| 6 | 6 | { |
| 7 | 7 | public function sessionShouldHave($key) |
| 8 | 8 | { |
| 9 | - return function () use ($key) { |
|
| 9 | + return function() use ($key) { |
|
| 10 | 10 | return session()->has($key); |
| 11 | 11 | }; |
| 12 | 12 | } |
@@ -14,7 +14,7 @@ discard block |
||
| 14 | 14 | $reaction = $this->makeReaction(); |
| 15 | 15 | $condition = resolve(Chain::class)->condition; |
| 16 | 16 | |
| 17 | - return function (...$f) use ($condition, $reaction) { |
|
| 17 | + return function(...$f) use ($condition, $reaction) { |
|
| 18 | 18 | if (!$condition($f)) { |
| 19 | 19 | $reaction(); |
| 20 | 20 | } |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | $debug = $chain->debugInfo; |
| 29 | 29 | |
| 30 | 30 | $responder = resolve(ResponderFactory::class)->make(); |
| 31 | - return function () use ($beforeResponse, $responder, $debug) { |
|
| 31 | + return function() use ($beforeResponse, $responder, $debug) { |
|
| 32 | 32 | event('heyman_reaction_is_happening', $debug); |
| 33 | 33 | $beforeResponse(); |
| 34 | 34 | $responder(); |