@@ -181,7 +181,7 @@ |
||
| 181 | 181 | */ |
| 182 | 182 | protected function dispatchToRouter() |
| 183 | 183 | { |
| 184 | - return function ($request) { |
|
| 184 | + return function($request) { |
|
| 185 | 185 | $this->app->instance('request', $request); |
| 186 | 186 | |
| 187 | 187 | return $this->router->dispatch($request); |
@@ -274,7 +274,7 @@ |
||
| 274 | 274 | if (strpos($value, '$') !== false) { |
| 275 | 275 | $repository = $this->repository; |
| 276 | 276 | |
| 277 | - $value = preg_replace_callback('~\${([a-zA-Z0-9_]+)}~', function ($pattern) use ($repository) { |
|
| 277 | + $value = preg_replace_callback('~\${([a-zA-Z0-9_]+)}~', function($pattern) use ($repository) { |
|
| 278 | 278 | $nestedVariable = $repository->get($pattern[1]); |
| 279 | 279 | |
| 280 | 280 | if (is_null($nestedVariable)) { |
@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | |
| 160 | 160 | $caughtLength = $this->caughtLength = 0; |
| 161 | 161 | |
| 162 | - ob_start(function ($buffer) { |
|
| 162 | + ob_start(function($buffer) { |
|
| 163 | 163 | $this->caughtBuffer = $buffer; |
| 164 | 164 | |
| 165 | 165 | return ''; |
@@ -168,7 +168,7 @@ discard block |
||
| 168 | 168 | $this->sendPhpResponse($exception); |
| 169 | 169 | |
| 170 | 170 | if (isset($this->caughtBuffer[0])) { |
| 171 | - ob_start(function ($buffer) { |
|
| 171 | + ob_start(function($buffer) { |
|
| 172 | 172 | if ($this->caughtLength) { |
| 173 | 173 | $cleanBuffer = substr_replace($buffer, '', 0, $this->caughtLength); |
| 174 | 174 | |
@@ -458,7 +458,7 @@ discard block |
||
| 458 | 458 | } |
| 459 | 459 | |
| 460 | 460 | if (is_string($frmt)) { |
| 461 | - $index = strpos($f = $frmt, '&', max(strrpos($f, '%f'), strrpos($f, '%l')) ?: strlen($f)); |
|
| 461 | + $index = strpos($f = $frmt, '&', max(strrpos($f, '%f'), strrpos($f, '%l')) ?: strlen($f)); |
|
| 462 | 462 | $frmt = [substr($f, 0, $index)] + preg_split('/&([^>]++)>/', substr($f, $index), -1, PREG_SPLIT_DELIM_CAPTURE); |
| 463 | 463 | |
| 464 | 464 | for ($index = 1; isset($frmt[$index]); ++$index) { |
@@ -357,7 +357,7 @@ discard block |
||
| 357 | 357 | public function setEditor($editor) |
| 358 | 358 | { |
| 359 | 359 | if ( ! is_callable($editor) && ! isset($this->editors[$editor])) { |
| 360 | - throw new InvalidArgumentException("Unknown editor identifier: [{$editor}]. Known editors: " . |
|
| 360 | + throw new InvalidArgumentException("Unknown editor identifier: [{$editor}]. Known editors: ". |
|
| 361 | 361 | implode(', ', array_keys($this->editors)) |
| 362 | 362 | ); |
| 363 | 363 | } |
@@ -380,7 +380,7 @@ discard block |
||
| 380 | 380 | { |
| 381 | 381 | $editor = $this->getEditor($file, $line); |
| 382 | 382 | |
| 383 | - if (empty($editor)) { |
|
| 383 | + if (empty($editor)) { |
|
| 384 | 384 | return false; |
| 385 | 385 | } |
| 386 | 386 | |
@@ -176,7 +176,7 @@ |
||
| 176 | 176 | $connection->setEventDispatcher($this->app['events']); |
| 177 | 177 | } |
| 178 | 178 | |
| 179 | - $connection->setReconnector(function ($connection) { |
|
| 179 | + $connection->setReconnector(function($connection) { |
|
| 180 | 180 | $this->reconnect($connection->getName()); |
| 181 | 181 | }); |
| 182 | 182 | |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | { |
| 72 | 72 | $pattern = sprintf('/(@)?%s\s*(.+?)\s*%s(\r?\n)?/s', $this->rawTags[0], $this->rawTags[1]); |
| 73 | 73 | |
| 74 | - $callback = function ($matches) { |
|
| 74 | + $callback = function($matches) { |
|
| 75 | 75 | $whitespace = empty($matches[3]) ? '' : $matches[3].$matches[3]; |
| 76 | 76 | |
| 77 | 77 | return $matches[1] ? substr($matches[0], 1) : "<?php echo {$matches[2]}; ?>{$whitespace}"; |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | { |
| 92 | 92 | $pattern = sprintf('/(@)?%s\s*(.+?)\s*%s(\r?\n)?/s', $this->contentTags[0], $this->contentTags[1]); |
| 93 | 93 | |
| 94 | - $callback = function ($matches) { |
|
| 94 | + $callback = function($matches) { |
|
| 95 | 95 | $whitespace = empty($matches[3]) ? '' : $matches[3].$matches[3]; |
| 96 | 96 | |
| 97 | 97 | $wrapped = sprintf($this->echoFormat, $matches[2]); |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | { |
| 114 | 114 | $pattern = sprintf('/(@)?%s\s*(.+?)\s*%s(\r?\n)?/s', $this->escapedTags[0], $this->escapedTags[1]); |
| 115 | 115 | |
| 116 | - $callback = function ($matches) { |
|
| 116 | + $callback = function($matches) { |
|
| 117 | 117 | $whitespace = empty($matches[3]) ? '' : $matches[3].$matches[3]; |
| 118 | 118 | |
| 119 | 119 | return $matches[1] ? $matches[0] : "<?php echo e({$matches[2]}); ?>{$whitespace}"; |
@@ -53,7 +53,7 @@ |
||
| 53 | 53 | */ |
| 54 | 54 | public function register() |
| 55 | 55 | { |
| 56 | - $this->booting(function () { |
|
| 56 | + $this->booting(function() { |
|
| 57 | 57 | $events = $this->listens(); |
| 58 | 58 | |
| 59 | 59 | foreach ((array) $events as $event => $listeners) { |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | return $this->createClassListener($listener, $wildcard); |
| 133 | 133 | } |
| 134 | 134 | |
| 135 | - return function ($event, $payload) use ($listener, $wildcard) { |
|
| 135 | + return function($event, $payload) use ($listener, $wildcard) { |
|
| 136 | 136 | if ($wildcard) { |
| 137 | 137 | return $listener($event, $payload); |
| 138 | 138 | } |
@@ -151,7 +151,7 @@ discard block |
||
| 151 | 151 | */ |
| 152 | 152 | public function createClassListener($listener, $wildcard = false): Closure |
| 153 | 153 | { |
| 154 | - return function ($event, $payload) use ($listener, $wildcard) { |
|
| 154 | + return function($event, $payload) use ($listener, $wildcard) { |
|
| 155 | 155 | if ($wildcard) { |
| 156 | 156 | return call_user_func($this->createClassClosure($listener), $event, $payload); |
| 157 | 157 | } |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | */ |
| 37 | 37 | public function register() |
| 38 | 38 | { |
| 39 | - $this->app->singleton('redis', function ($app) { |
|
| 39 | + $this->app->singleton('redis', function($app) { |
|
| 40 | 40 | $config = $app['config']->get('database.redis', []); |
| 41 | 41 | |
| 42 | 42 | return new RedisManager($config); |