@@ -34,7 +34,7 @@ |
||
| 34 | 34 | * Create a new queue manager instance. |
| 35 | 35 | * |
| 36 | 36 | * @param \Illuminate\Foundation\Application $app |
| 37 | - * @return void |
|
| 37 | + * @return QueueManager |
|
| 38 | 38 | */ |
| 39 | 39 | public function __construct($app) |
| 40 | 40 | { |
@@ -120,7 +120,7 @@ |
||
| 120 | 120 | // If the connection has not been resolved yet we will resolve it now as all |
| 121 | 121 | // of the connections are resolved when they are actually needed so we do |
| 122 | 122 | // not make any unnecessary connection to the various queue end-points. |
| 123 | - if (! isset($this->connections[$name])) { |
|
| 123 | + if (!isset($this->connections[$name])) { |
|
| 124 | 124 | $this->connections[$name] = $this->resolve($name); |
| 125 | 125 | |
| 126 | 126 | $this->connections[$name]->setContainer($this->app); |
@@ -121,7 +121,7 @@ |
||
| 121 | 121 | * Pop the next job off of the queue. |
| 122 | 122 | * |
| 123 | 123 | * @param string $queue |
| 124 | - * @return \Illuminate\Contracts\Queue\Job|null |
|
| 124 | + * @return RedisJob|null |
|
| 125 | 125 | */ |
| 126 | 126 | public function pop($queue = null) |
| 127 | 127 | { |
@@ -129,13 +129,13 @@ discard block |
||
| 129 | 129 | |
| 130 | 130 | $queue = $this->getQueue($queue); |
| 131 | 131 | |
| 132 | - if (! is_null($this->expire)) { |
|
| 132 | + if (!is_null($this->expire)) { |
|
| 133 | 133 | $this->migrateAllExpiredJobs($queue); |
| 134 | 134 | } |
| 135 | 135 | |
| 136 | 136 | $job = $this->getConnection()->lpop($queue); |
| 137 | 137 | |
| 138 | - if (! is_null($job)) { |
|
| 138 | + if (!is_null($job)) { |
|
| 139 | 139 | $this->getConnection()->zadd($queue.':reserved', $this->getTime() + $this->expire, $job); |
| 140 | 140 | |
| 141 | 141 | return new RedisJob($this->container, $this, $job, $original); |
@@ -178,7 +178,7 @@ discard block |
||
| 178 | 178 | { |
| 179 | 179 | $options = ['cas' => true, 'watch' => $from, 'retry' => 10]; |
| 180 | 180 | |
| 181 | - $this->getConnection()->transaction($options, function ($transaction) use ($from, $to) { |
|
| 181 | + $this->getConnection()->transaction($options, function($transaction) use ($from, $to) { |
|
| 182 | 182 | // First we need to get all of jobs that have expired based on the current time |
| 183 | 183 | // so that we can push them onto the main queue. After we get them we simply |
| 184 | 184 | // remove them from this "delay" queues. All of this within a transaction. |
@@ -16,7 +16,7 @@ discard block |
||
| 16 | 16 | * @param string $job |
| 17 | 17 | * @param mixed $data |
| 18 | 18 | * @param string $queue |
| 19 | - * @return mixed |
|
| 19 | + * @return integer |
|
| 20 | 20 | * |
| 21 | 21 | * @throws \Exception|\Throwable |
| 22 | 22 | */ |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | * @param string $job |
| 64 | 64 | * @param mixed $data |
| 65 | 65 | * @param string $queue |
| 66 | - * @return mixed |
|
| 66 | + * @return integer |
|
| 67 | 67 | */ |
| 68 | 68 | public function later($delay, $job, $data = '', $queue = null) |
| 69 | 69 | { |
@@ -135,7 +135,7 @@ |
||
| 135 | 135 | * @param \Illuminate\Routing\Controller $instance |
| 136 | 136 | * @param \Illuminate\Routing\Route $route |
| 137 | 137 | * @param string $method |
| 138 | - * @return mixed |
|
| 138 | + * @return \Symfony\Component\HttpFoundation\Response |
|
| 139 | 139 | */ |
| 140 | 140 | protected function call($instance, $route, $method) |
| 141 | 141 | { |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | return (new Pipeline($this->container)) |
| 90 | 90 | ->send($request) |
| 91 | 91 | ->through($middleware) |
| 92 | - ->then(function ($request) use ($instance, $route, $method) { |
|
| 92 | + ->then(function($request) use ($instance, $route, $method) { |
|
| 93 | 93 | return $this->router->prepareResponse( |
| 94 | 94 | $request, $this->call($instance, $route, $method) |
| 95 | 95 | ); |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | $results = new Collection; |
| 109 | 109 | |
| 110 | 110 | foreach ($instance->getMiddleware() as $name => $options) { |
| 111 | - if (! $this->methodExcludedByOptions($method, $options)) { |
|
| 111 | + if (!$this->methodExcludedByOptions($method, $options)) { |
|
| 112 | 112 | $results[] = $this->router->resolveMiddlewareClassName($name); |
| 113 | 113 | } |
| 114 | 114 | } |
@@ -125,8 +125,8 @@ discard block |
||
| 125 | 125 | */ |
| 126 | 126 | public function methodExcludedByOptions($method, array $options) |
| 127 | 127 | { |
| 128 | - return (isset($options['only']) && ! in_array($method, (array) $options['only'])) || |
|
| 129 | - (! empty($options['except']) && in_array($method, (array) $options['except'])); |
|
| 128 | + return (isset($options['only']) && !in_array($method, (array) $options['only'])) || |
|
| 129 | + (!empty($options['except']) && in_array($method, (array) $options['except'])); |
|
| 130 | 130 | } |
| 131 | 131 | |
| 132 | 132 | /** |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | * |
| 13 | 13 | * @param \Illuminate\Routing\Route $route |
| 14 | 14 | * @param \Illuminate\Http\Request $request |
| 15 | - * @return bool |
|
| 15 | + * @return integer |
|
| 16 | 16 | */ |
| 17 | 17 | public function matches(Route $route, Request $request) |
| 18 | 18 | { |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | * @param \Closure $next |
| 34 | 34 | * @param int $maxAttempts |
| 35 | 35 | * @param int $decayMinutes |
| 36 | - * @return mixed |
|
| 36 | + * @return \Illuminate\Http\Response |
|
| 37 | 37 | */ |
| 38 | 38 | public function handle($request, Closure $next, $maxAttempts = 60, $decayMinutes = 1) |
| 39 | 39 | { |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | * |
| 113 | 113 | * @param string $key |
| 114 | 114 | * @param int $maxAttempts |
| 115 | - * @return int |
|
| 115 | + * @return double |
|
| 116 | 116 | */ |
| 117 | 117 | protected function calculateRemainingAttempts($key, $maxAttempts) |
| 118 | 118 | { |
@@ -98,7 +98,7 @@ |
||
| 98 | 98 | 'X-RateLimit-Remaining' => $remainingAttempts, |
| 99 | 99 | ]; |
| 100 | 100 | |
| 101 | - if (! is_null($retryAfter)) { |
|
| 101 | + if (!is_null($retryAfter)) { |
|
| 102 | 102 | $headers['Retry-After'] = $retryAfter; |
| 103 | 103 | } |
| 104 | 104 | |
@@ -361,7 +361,7 @@ |
||
| 361 | 361 | * @param string $base |
| 362 | 362 | * @param string $controller |
| 363 | 363 | * @param array $options |
| 364 | - * @return void |
|
| 364 | + * @return Route |
|
| 365 | 365 | */ |
| 366 | 366 | protected function addResourceUpdate($name, $base, $controller, $options) |
| 367 | 367 | { |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | */ |
| 63 | 63 | public function register($name, $controller, array $options = []) |
| 64 | 64 | { |
| 65 | - if (isset($options['parameters']) && ! isset($this->parameters)) { |
|
| 65 | + if (isset($options['parameters']) && !isset($this->parameters)) { |
|
| 66 | 66 | $this->parameters = $options['parameters']; |
| 67 | 67 | } |
| 68 | 68 | |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | // We need to extract the base resource from the resource name. Nested resources |
| 103 | 103 | // are supported in the framework, but we need to know what name to use for a |
| 104 | 104 | // place-holder on the route parameters, which should be the base resources. |
| 105 | - $callback = function ($me) use ($name, $controller, $options) { |
|
| 105 | + $callback = function($me) use ($name, $controller, $options) { |
|
| 106 | 106 | $me->resource($name, $controller, $options); |
| 107 | 107 | }; |
| 108 | 108 | |
@@ -153,7 +153,7 @@ discard block |
||
| 153 | 153 | */ |
| 154 | 154 | public function getResourceUri($resource) |
| 155 | 155 | { |
| 156 | - if (! Str::contains($resource, '.')) { |
|
| 156 | + if (!Str::contains($resource, '.')) { |
|
| 157 | 157 | return $resource; |
| 158 | 158 | } |
| 159 | 159 | |
@@ -178,7 +178,7 @@ discard block |
||
| 178 | 178 | // We will spin through the segments and create a place-holder for each of the |
| 179 | 179 | // resource segments, as well as the resource itself. Then we should get an |
| 180 | 180 | // entire string for the resource URI that contains all nested resources. |
| 181 | - return implode('/', array_map(function ($s) { |
|
| 181 | + return implode('/', array_map(function($s) { |
|
| 182 | 182 | return $s.'/{'.$this->getResourceWildcard($s).'}'; |
| 183 | 183 | |
| 184 | 184 | }, $segments)); |
@@ -219,7 +219,7 @@ discard block |
||
| 219 | 219 | // the resource action. Otherwise we'll just use an empty string for here. |
| 220 | 220 | $prefix = isset($options['as']) ? $options['as'].'.' : ''; |
| 221 | 221 | |
| 222 | - if (! $this->router->hasGroupStack()) { |
|
| 222 | + if (!$this->router->hasGroupStack()) { |
|
| 223 | 223 | return $prefix.$resource.'.'.$method; |
| 224 | 224 | } |
| 225 | 225 | |
@@ -454,7 +454,7 @@ discard block |
||
| 454 | 454 | * Get the parameter matches for the path portion of the URI. |
| 455 | 455 | * |
| 456 | 456 | * @param \Illuminate\Http\Request $request |
| 457 | - * @return array |
|
| 457 | + * @return string[] |
|
| 458 | 458 | */ |
| 459 | 459 | protected function bindPathParameters(Request $request) |
| 460 | 460 | { |
@@ -480,7 +480,7 @@ discard block |
||
| 480 | 480 | /** |
| 481 | 481 | * Combine a set of parameter matches with the route's keys. |
| 482 | 482 | * |
| 483 | - * @param array $matches |
|
| 483 | + * @param string[] $matches |
|
| 484 | 484 | * @return array |
| 485 | 485 | */ |
| 486 | 486 | protected function matchToKeys(array $matches) |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | $this->methods = (array) $methods; |
| 114 | 114 | $this->action = $this->parseAction($action); |
| 115 | 115 | |
| 116 | - if (in_array('GET', $this->methods) && ! in_array('HEAD', $this->methods)) { |
|
| 116 | + if (in_array('GET', $this->methods) && !in_array('HEAD', $this->methods)) { |
|
| 117 | 117 | $this->methods[] = 'HEAD'; |
| 118 | 118 | } |
| 119 | 119 | |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | $this->container = $this->container ?: new Container; |
| 134 | 134 | |
| 135 | 135 | try { |
| 136 | - if (! is_string($this->action['uses'])) { |
|
| 136 | + if (!is_string($this->action['uses'])) { |
|
| 137 | 137 | return $this->runCallable($request); |
| 138 | 138 | } |
| 139 | 139 | |
@@ -186,11 +186,11 @@ discard block |
||
| 186 | 186 | $this->compileRoute(); |
| 187 | 187 | |
| 188 | 188 | foreach ($this->getValidators() as $validator) { |
| 189 | - if (! $includingMethod && $validator instanceof MethodValidator) { |
|
| 189 | + if (!$includingMethod && $validator instanceof MethodValidator) { |
|
| 190 | 190 | continue; |
| 191 | 191 | } |
| 192 | 192 | |
| 193 | - if (! $validator->matches($this, $request)) { |
|
| 193 | + if (!$validator->matches($this, $request)) { |
|
| 194 | 194 | return false; |
| 195 | 195 | } |
| 196 | 196 | } |
@@ -281,7 +281,7 @@ discard block |
||
| 281 | 281 | $parameters = (new ReflectionFunction($action['uses']))->getParameters(); |
| 282 | 282 | } |
| 283 | 283 | |
| 284 | - return is_null($subClass) ? $parameters : array_filter($parameters, function ($p) use ($subClass) { |
|
| 284 | + return is_null($subClass) ? $parameters : array_filter($parameters, function($p) use ($subClass) { |
|
| 285 | 285 | return $p->getClass() && $p->getClass()->isSubclassOf($subClass); |
| 286 | 286 | }); |
| 287 | 287 | } |
@@ -304,7 +304,7 @@ discard block |
||
| 304 | 304 | */ |
| 305 | 305 | public function hasParameter($name) |
| 306 | 306 | { |
| 307 | - if (! $this->hasParameters()) { |
|
| 307 | + if (!$this->hasParameters()) { |
|
| 308 | 308 | return false; |
| 309 | 309 | } |
| 310 | 310 | |
@@ -372,7 +372,7 @@ discard block |
||
| 372 | 372 | public function parameters() |
| 373 | 373 | { |
| 374 | 374 | if (isset($this->parameters)) { |
| 375 | - return array_map(function ($value) { |
|
| 375 | + return array_map(function($value) { |
|
| 376 | 376 | return is_string($value) ? rawurldecode($value) : $value; |
| 377 | 377 | |
| 378 | 378 | }, $this->parameters); |
@@ -388,8 +388,8 @@ discard block |
||
| 388 | 388 | */ |
| 389 | 389 | public function parametersWithoutNulls() |
| 390 | 390 | { |
| 391 | - return array_filter($this->parameters(), function ($p) { |
|
| 392 | - return ! is_null($p); |
|
| 391 | + return array_filter($this->parameters(), function($p) { |
|
| 392 | + return !is_null($p); |
|
| 393 | 393 | }); |
| 394 | 394 | } |
| 395 | 395 | |
@@ -416,7 +416,7 @@ discard block |
||
| 416 | 416 | { |
| 417 | 417 | preg_match_all('/\{(.*?)\}/', $this->domain().$this->uri, $matches); |
| 418 | 418 | |
| 419 | - return array_map(function ($m) { |
|
| 419 | + return array_map(function($m) { |
|
| 420 | 420 | return trim($m, '?'); |
| 421 | 421 | }, $matches[1]); |
| 422 | 422 | } |
@@ -456,7 +456,7 @@ discard block |
||
| 456 | 456 | // If the route has a regular expression for the host part of the URI, we will |
| 457 | 457 | // compile that and get the parameter matches for this domain. We will then |
| 458 | 458 | // merge them into this parameters array so that this array is completed. |
| 459 | - if (! is_null($this->compiled->getHostRegex())) { |
|
| 459 | + if (!is_null($this->compiled->getHostRegex())) { |
|
| 460 | 460 | $params = $this->bindHostParameters( |
| 461 | 461 | $request, $params |
| 462 | 462 | ); |
@@ -506,7 +506,7 @@ discard block |
||
| 506 | 506 | |
| 507 | 507 | $parameters = array_intersect_key($matches, array_flip($parameterNames)); |
| 508 | 508 | |
| 509 | - return array_filter($parameters, function ($value) { |
|
| 509 | + return array_filter($parameters, function($value) { |
|
| 510 | 510 | return is_string($value) && strlen($value) > 0; |
| 511 | 511 | }); |
| 512 | 512 | } |
@@ -524,7 +524,7 @@ discard block |
||
| 524 | 524 | } |
| 525 | 525 | |
| 526 | 526 | foreach ($this->defaults as $key => $value) { |
| 527 | - if (! isset($parameters[$key])) { |
|
| 527 | + if (!isset($parameters[$key])) { |
|
| 528 | 528 | $parameters[$key] = $value; |
| 529 | 529 | } |
| 530 | 530 | } |
@@ -546,7 +546,7 @@ discard block |
||
| 546 | 546 | // fluent routing. In that case, we set a default closure, to be executed |
| 547 | 547 | // if the user never explicitly sets an action to handle the given uri. |
| 548 | 548 | if (is_null($action)) { |
| 549 | - return ['uses' => function () { |
|
| 549 | + return ['uses' => function() { |
|
| 550 | 550 | throw new LogicException("Route for [{$this->uri}] has no action."); |
| 551 | 551 | }]; |
| 552 | 552 | } |
@@ -561,11 +561,11 @@ discard block |
||
| 561 | 561 | // If no "uses" property has been set, we will dig through the array to find a |
| 562 | 562 | // Closure instance within this list. We will set the first Closure we come |
| 563 | 563 | // across into the "uses" property that will get fired off by this route. |
| 564 | - elseif (! isset($action['uses'])) { |
|
| 564 | + elseif (!isset($action['uses'])) { |
|
| 565 | 565 | $action['uses'] = $this->findCallable($action); |
| 566 | 566 | } |
| 567 | 567 | |
| 568 | - if (is_string($action['uses']) && ! Str::contains($action['uses'], '@')) { |
|
| 568 | + if (is_string($action['uses']) && !Str::contains($action['uses'], '@')) { |
|
| 569 | 569 | throw new UnexpectedValueException(sprintf( |
| 570 | 570 | 'Invalid route action: [%s]', $action['uses'] |
| 571 | 571 | )); |
@@ -582,7 +582,7 @@ discard block |
||
| 582 | 582 | */ |
| 583 | 583 | protected function findCallable(array $action) |
| 584 | 584 | { |
| 585 | - return Arr::first($action, function ($key, $value) { |
|
| 585 | + return Arr::first($action, function($key, $value) { |
|
| 586 | 586 | return is_callable($value) && is_numeric($key); |
| 587 | 587 | }); |
| 588 | 588 | } |
@@ -193,7 +193,7 @@ discard block |
||
| 193 | 193 | * Register a new route responding to all verbs. |
| 194 | 194 | * |
| 195 | 195 | * @param string $uri |
| 196 | - * @param \Closure|array|string|null $action |
|
| 196 | + * @param string $action |
|
| 197 | 197 | * @return \Illuminate\Routing\Route |
| 198 | 198 | */ |
| 199 | 199 | public function any($uri, $action = null) |
@@ -206,7 +206,7 @@ discard block |
||
| 206 | 206 | /** |
| 207 | 207 | * Register a new route with the given verbs. |
| 208 | 208 | * |
| 209 | - * @param array|string $methods |
|
| 209 | + * @param string[] $methods |
|
| 210 | 210 | * @param string $uri |
| 211 | 211 | * @param \Closure|array|string|null $action |
| 212 | 212 | * @return \Illuminate\Routing\Route |
@@ -681,7 +681,7 @@ discard block |
||
| 681 | 681 | * Dispatch the request to a route and return the response. |
| 682 | 682 | * |
| 683 | 683 | * @param \Illuminate\Http\Request $request |
| 684 | - * @return mixed |
|
| 684 | + * @return Response |
|
| 685 | 685 | */ |
| 686 | 686 | public function dispatchToRoute(Request $request) |
| 687 | 687 | { |
@@ -769,7 +769,7 @@ |
||
| 769 | 769 | list($name, $parameters) = array_pad(explode(':', $name, 2), 2, null); |
| 770 | 770 | |
| 771 | 771 | return (isset($map[$name]) ? $map[$name] : $name). |
| 772 | - ($parameters !== null ? ':'.$parameters : ''); |
|
| 772 | + ($parameters !== null ? ':'.$parameters : ''); |
|
| 773 | 773 | } |
| 774 | 774 | } |
| 775 | 775 | |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | $this->routes = new RouteCollection; |
| 113 | 113 | $this->container = $container ?: new Container; |
| 114 | 114 | |
| 115 | - $this->bind('_missing', function ($v) { |
|
| 115 | + $this->bind('_missing', function($v) { |
|
| 116 | 116 | return explode('/', $v); |
| 117 | 117 | }); |
| 118 | 118 | } |
@@ -248,7 +248,7 @@ discard block |
||
| 248 | 248 | // First, we will check to see if a controller prefix has been registered in |
| 249 | 249 | // the route group. If it has, we will need to prefix it before trying to |
| 250 | 250 | // reflect into the class instance and pull out the method for routing. |
| 251 | - if (! empty($this->groupStack)) { |
|
| 251 | + if (!empty($this->groupStack)) { |
|
| 252 | 252 | $prepended = $this->prependGroupUses($controller); |
| 253 | 253 | } |
| 254 | 254 | |
@@ -408,7 +408,7 @@ discard block |
||
| 408 | 408 | */ |
| 409 | 409 | protected function updateGroupStack(array $attributes) |
| 410 | 410 | { |
| 411 | - if (! empty($this->groupStack)) { |
|
| 411 | + if (!empty($this->groupStack)) { |
|
| 412 | 412 | $attributes = $this->mergeGroup($attributes, end($this->groupStack)); |
| 413 | 413 | } |
| 414 | 414 | |
@@ -498,7 +498,7 @@ discard block |
||
| 498 | 498 | */ |
| 499 | 499 | public function getLastGroupPrefix() |
| 500 | 500 | { |
| 501 | - if (! empty($this->groupStack)) { |
|
| 501 | + if (!empty($this->groupStack)) { |
|
| 502 | 502 | $last = end($this->groupStack); |
| 503 | 503 | |
| 504 | 504 | return isset($last['prefix']) ? $last['prefix'] : ''; |
@@ -637,7 +637,7 @@ discard block |
||
| 637 | 637 | // Here we'll merge any group "uses" statement if necessary so that the action |
| 638 | 638 | // has the proper clause for this property. Then we can simply set the name |
| 639 | 639 | // of the controller on the action and return the action array for usage. |
| 640 | - if (! empty($this->groupStack)) { |
|
| 640 | + if (!empty($this->groupStack)) { |
|
| 641 | 641 | $action['uses'] = $this->prependGroupUses($action['uses']); |
| 642 | 642 | } |
| 643 | 643 | |
@@ -690,7 +690,7 @@ discard block |
||
| 690 | 690 | // receive access to this route instance for checking of the parameters. |
| 691 | 691 | $route = $this->findRoute($request); |
| 692 | 692 | |
| 693 | - $request->setRouteResolver(function () use ($route) { |
|
| 693 | + $request->setRouteResolver(function() use ($route) { |
|
| 694 | 694 | return $route; |
| 695 | 695 | }); |
| 696 | 696 | |
@@ -718,7 +718,7 @@ discard block |
||
| 718 | 718 | return (new Pipeline($this->container)) |
| 719 | 719 | ->send($request) |
| 720 | 720 | ->through($middleware) |
| 721 | - ->then(function ($request) use ($route) { |
|
| 721 | + ->then(function($request) use ($route) { |
|
| 722 | 722 | return $this->prepareResponse( |
| 723 | 723 | $request, |
| 724 | 724 | $route->run($request) |
@@ -734,7 +734,7 @@ discard block |
||
| 734 | 734 | */ |
| 735 | 735 | public function gatherRouteMiddlewares(Route $route) |
| 736 | 736 | { |
| 737 | - return Collection::make($route->middleware())->map(function ($name) { |
|
| 737 | + return Collection::make($route->middleware())->map(function($name) { |
|
| 738 | 738 | return Collection::make($this->resolveMiddlewareClassName($name)); |
| 739 | 739 | }) |
| 740 | 740 | ->flatten()->all(); |
@@ -860,7 +860,7 @@ discard block |
||
| 860 | 860 | $class = $parameter->getClass(); |
| 861 | 861 | |
| 862 | 862 | if (array_key_exists($parameter->name, $parameters) && |
| 863 | - ! $route->getParameter($parameter->name) instanceof Model) { |
|
| 863 | + !$route->getParameter($parameter->name) instanceof Model) { |
|
| 864 | 864 | $method = $parameter->isDefaultValueAvailable() ? 'first' : 'firstOrFail'; |
| 865 | 865 | |
| 866 | 866 | $model = $class->newInstance(); |
@@ -947,7 +947,7 @@ discard block |
||
| 947 | 947 | */ |
| 948 | 948 | public function prependMiddlewareToGroup($group, $middleware) |
| 949 | 949 | { |
| 950 | - if (isset($this->middlewareGroups[$group]) && ! in_array($middleware, $this->middlewareGroups[$group])) { |
|
| 950 | + if (isset($this->middlewareGroups[$group]) && !in_array($middleware, $this->middlewareGroups[$group])) { |
|
| 951 | 951 | array_unshift($this->middlewareGroups[$group], $middleware); |
| 952 | 952 | } |
| 953 | 953 | |
@@ -965,7 +965,7 @@ discard block |
||
| 965 | 965 | */ |
| 966 | 966 | public function pushMiddlewareToGroup($group, $middleware) |
| 967 | 967 | { |
| 968 | - if (isset($this->middlewareGroups[$group]) && ! in_array($middleware, $this->middlewareGroups[$group])) { |
|
| 968 | + if (isset($this->middlewareGroups[$group]) && !in_array($middleware, $this->middlewareGroups[$group])) { |
|
| 969 | 969 | $this->middlewareGroups[$group][] = $middleware; |
| 970 | 970 | } |
| 971 | 971 | |
@@ -984,7 +984,7 @@ discard block |
||
| 984 | 984 | */ |
| 985 | 985 | public function model($key, $class, Closure $callback = null) |
| 986 | 986 | { |
| 987 | - $this->bind($key, function ($value) use ($class, $callback) { |
|
| 987 | + $this->bind($key, function($value) use ($class, $callback) { |
|
| 988 | 988 | if (is_null($value)) { |
| 989 | 989 | return; |
| 990 | 990 | } |
@@ -1033,7 +1033,7 @@ discard block |
||
| 1033 | 1033 | */ |
| 1034 | 1034 | public function createClassBinding($binding) |
| 1035 | 1035 | { |
| 1036 | - return function ($value, $route) use ($binding) { |
|
| 1036 | + return function($value, $route) use ($binding) { |
|
| 1037 | 1037 | // If the binding has an @ sign, we will assume it's being used to delimit |
| 1038 | 1038 | // the class name from the bind method name. This allows for bindings |
| 1039 | 1039 | // to run multiple bind methods in a single class for convenience. |
@@ -1083,7 +1083,7 @@ discard block |
||
| 1083 | 1083 | { |
| 1084 | 1084 | if ($response instanceof PsrResponseInterface) { |
| 1085 | 1085 | $response = (new HttpFoundationFactory)->createResponse($response); |
| 1086 | - } elseif (! $response instanceof SymfonyResponse) { |
|
| 1086 | + } elseif (!$response instanceof SymfonyResponse) { |
|
| 1087 | 1087 | $response = new Response($response); |
| 1088 | 1088 | } |
| 1089 | 1089 | |
@@ -1097,7 +1097,7 @@ discard block |
||
| 1097 | 1097 | */ |
| 1098 | 1098 | public function hasGroupStack() |
| 1099 | 1099 | { |
| 1100 | - return ! empty($this->groupStack); |
|
| 1100 | + return !empty($this->groupStack); |
|
| 1101 | 1101 | } |
| 1102 | 1102 | |
| 1103 | 1103 | /** |
@@ -1198,7 +1198,7 @@ discard block |
||
| 1198 | 1198 | */ |
| 1199 | 1199 | public function currentRouteAction() |
| 1200 | 1200 | { |
| 1201 | - if (! $this->current()) { |
|
| 1201 | + if (!$this->current()) { |
|
| 1202 | 1202 | return; |
| 1203 | 1203 | } |
| 1204 | 1204 | |