@@ -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 | } |
@@ -19,14 +19,14 @@ discard block |
||
| 19 | 19 | |
| 20 | 20 | protected function abort($abort): \Closure |
| 21 | 21 | { |
| 22 | - return function () use ($abort) { |
|
| 22 | + return function() use ($abort) { |
|
| 23 | 23 | abort(...$abort); |
| 24 | 24 | }; |
| 25 | 25 | } |
| 26 | 26 | |
| 27 | 27 | protected function nothing(): \Closure |
| 28 | 28 | { |
| 29 | - return function () { |
|
| 29 | + return function() { |
|
| 30 | 30 | }; |
| 31 | 31 | } |
| 32 | 32 | |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | */ |
| 38 | 38 | protected function exception(array $e): \Closure |
| 39 | 39 | { |
| 40 | - return function () use ($e) { |
|
| 40 | + return function() use ($e) { |
|
| 41 | 41 | $exClass = $e[0]; |
| 42 | 42 | $message = $e[1]; |
| 43 | 43 | |
@@ -52,14 +52,14 @@ discard block |
||
| 52 | 52 | */ |
| 53 | 53 | protected function response(...$resp): \Closure |
| 54 | 54 | { |
| 55 | - return function () use ($resp) { |
|
| 55 | + return function() use ($resp) { |
|
| 56 | 56 | $this->sendResponse($resp, response()); |
| 57 | 57 | }; |
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | protected function redirect(...$resp): \Closure |
| 61 | 61 | { |
| 62 | - return function () use ($resp) { |
|
| 62 | + return function() use ($resp) { |
|
| 63 | 63 | $this->sendResponse($resp, redirect()); |
| 64 | 64 | }; |
| 65 | 65 | } |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | */ |
| 74 | 74 | protected function respondFrom($method): \Closure |
| 75 | 75 | { |
| 76 | - return function () use ($method) { |
|
| 76 | + return function() use ($method) { |
|
| 77 | 77 | throw new HttpResponseException(app()->call(...$method)); |
| 78 | 78 | }; |
| 79 | 79 | } |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | */ |
| 107 | 107 | public function validatorCallback($modifier, $rules, array $messages = [], array $customAttributes = []): \Closure |
| 108 | 108 | { |
| 109 | - $validator = function () use ($modifier, $rules, $messages, $customAttributes) { |
|
| 109 | + $validator = function() use ($modifier, $rules, $messages, $customAttributes) { |
|
| 110 | 110 | if (is_callable($rules)) { |
| 111 | 111 | $rules = $rules(); |
| 112 | 112 | } |
@@ -29,7 +29,7 @@ |
||
| 29 | 29 | public function __destruct() |
| 30 | 30 | { |
| 31 | 31 | $data = $this->validationData; |
| 32 | - $modifier = $this->modifier ?: function ($d) { |
|
| 32 | + $modifier = $this->modifier ?: function($d) { |
|
| 33 | 33 | return $d; |
| 34 | 34 | }; |
| 35 | 35 | $chain = resolve('heyman.chain'); |
@@ -12,7 +12,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 | }; |
@@ -9,11 +9,11 @@ |
||
| 9 | 9 | { |
| 10 | 10 | public function start() |
| 11 | 11 | { |
| 12 | - Route::matched(function (RouteMatched $eventObj) { |
|
| 12 | + Route::matched(function(RouteMatched $eventObj) { |
|
| 13 | 13 | $matchedRoute = [ |
| 14 | 14 | $eventObj->route->getName(), |
| 15 | 15 | $eventObj->route->getActionName(), |
| 16 | - $eventObj->request->method().$eventObj->route->uri, |
|
| 16 | + $eventObj->request->method() . $eventObj->route->uri, |
|
| 17 | 17 | ]; |
| 18 | 18 | |
| 19 | 19 | $t = resolve('BaseManager')->data['Imanghafoori\HeyMan\WatchingStrategies\Routes\RouterEventManager'] ?? []; |
@@ -43,7 +43,7 @@ |
||
| 43 | 43 | $method = ltrim($method, 'about'); |
| 44 | 44 | |
| 45 | 45 | if (in_array($method, ['Route', 'Action', 'Url'])) { |
| 46 | - $args = resolve(RouteNormalizer::class)->{'normalize'.$method}($args); |
|
| 46 | + $args = resolve(RouteNormalizer::class)->{'normalize' . $method}($args); |
|
| 47 | 47 | |
| 48 | 48 | return resolve('BaseManager')->forgetAbout(RouterEventManager::class, $args); |
| 49 | 49 | } |