@@ -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 | } |
@@ -11,15 +11,15 @@ |
||
| 11 | 11 | |
| 12 | 12 | public function thisMethodShouldAllow($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 thisValueShouldAllow($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 | } |
@@ -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 | } |
@@ -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 | } |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | |
| 30 | 30 | $responder = resolve(ResponderFactory::class)->make(); |
| 31 | 31 | |
| 32 | - return function () use ($beforeReaction, $responder, $debug) { |
|
| 32 | + return function() use ($beforeReaction, $responder, $debug) { |
|
| 33 | 33 | event('heyman_reaction_is_happening', $debug); |
| 34 | 34 | $beforeReaction(); |
| 35 | 35 | $responder(); |
@@ -23,14 +23,14 @@ discard block |
||
| 23 | 23 | |
| 24 | 24 | public function addCallbackBeforeReaction($callback, $parameters) |
| 25 | 25 | { |
| 26 | - $this->beforeReaction[] = function () use ($callback, $parameters) { |
|
| 26 | + $this->beforeReaction[] = function() use ($callback, $parameters) { |
|
| 27 | 27 | app()->call($callback, $parameters); |
| 28 | 28 | }; |
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | public function addEventBeforeReaction($event, array $payload, bool $halt) |
| 32 | 32 | { |
| 33 | - $this->beforeReaction[] = function () use ($event, $payload, $halt) { |
|
| 33 | + $this->beforeReaction[] = function() use ($event, $payload, $halt) { |
|
| 34 | 34 | resolve('events')->dispatch($event, $payload, $halt); |
| 35 | 35 | }; |
| 36 | 36 | } |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | $tasks = $this->beforeReaction; |
| 47 | 47 | $this->beforeReaction = []; |
| 48 | 48 | |
| 49 | - return function () use ($tasks) { |
|
| 49 | + return function() use ($tasks) { |
|
| 50 | 50 | foreach ($tasks as $task) { |
| 51 | 51 | $task(); |
| 52 | 52 | } |
@@ -16,6 +16,6 @@ |
||
| 16 | 16 | |
| 17 | 17 | public function whenYouReachCheckPoint($name) |
| 18 | 18 | { |
| 19 | - $this->whenEventHappens('heyman_checkpoint_'.$name); |
|
| 19 | + $this->whenEventHappens('heyman_checkpoint_' . $name); |
|
| 20 | 20 | } |
| 21 | 21 | } |
@@ -29,6 +29,6 @@ |
||
| 29 | 29 | |
| 30 | 30 | public function checkPoint($pointName) |
| 31 | 31 | { |
| 32 | - event('heyman_checkpoint_'.$pointName); |
|
| 32 | + event('heyman_checkpoint_' . $pointName); |
|
| 33 | 33 | } |
| 34 | 34 | } |