@@ -119,8 +119,7 @@ |
||
| 119 | 119 | try |
| 120 | 120 | { |
| 121 | 121 | $response = $this->sendRequestThroughRouter($request); |
| 122 | - } |
|
| 123 | - catch (Throwable $e) |
|
| 122 | + } catch (Throwable $e) |
|
| 124 | 123 | { |
| 125 | 124 | $this->reportException($e); |
| 126 | 125 | |
@@ -106,8 +106,7 @@ discard block |
||
| 106 | 106 | try |
| 107 | 107 | { |
| 108 | 108 | $logger = $this->container->make(LoggerInterface::class); |
| 109 | - } |
|
| 110 | - catch (Exception $e) |
|
| 109 | + } catch (Exception $e) |
|
| 111 | 110 | { |
| 112 | 111 | throw $e; |
| 113 | 112 | } |
@@ -288,8 +287,7 @@ discard block |
||
| 288 | 287 | return config('app.debug') && class_exists(GDebug::class) |
| 289 | 288 | ? $this->renderExceptionWithGDebug($e) |
| 290 | 289 | : $this->renderExceptionWithFlatDesignDebug($e, config('app.debug')); |
| 291 | - } |
|
| 292 | - catch (Exception $e) |
|
| 290 | + } catch (Exception $e) |
|
| 293 | 291 | { |
| 294 | 292 | $this->renderExceptionWithFlatDesignDebug($e, config('app.debug')); |
| 295 | 293 | } |
@@ -357,8 +355,7 @@ discard block |
||
| 357 | 355 | $response = new RedirectResponse( |
| 358 | 356 | $response->getTargetUrl(), $response->status(), $response->headers->all() |
| 359 | 357 | ); |
| 360 | - } |
|
| 361 | - else |
|
| 358 | + } else |
|
| 362 | 359 | { |
| 363 | 360 | $response = new Response( |
| 364 | 361 | $response->content(), $response->status(), $response->headers->all() |
@@ -109,8 +109,7 @@ |
||
| 109 | 109 | try |
| 110 | 110 | { |
| 111 | 111 | $this->getExceptionHandler()->report($e); |
| 112 | - } |
|
| 113 | - catch (Exception $e) |
|
| 112 | + } catch (Exception $e) |
|
| 114 | 113 | { |
| 115 | 114 | // |
| 116 | 115 | } |
@@ -53,8 +53,7 @@ |
||
| 53 | 53 | try |
| 54 | 54 | { |
| 55 | 55 | $this->createEnv($app)->load(); |
| 56 | - } |
|
| 57 | - catch (Exception $e) |
|
| 56 | + } catch (Exception $e) |
|
| 58 | 57 | { |
| 59 | 58 | // |
| 60 | 59 | } |
@@ -459,8 +459,7 @@ discard block |
||
| 459 | 459 | try |
| 460 | 460 | { |
| 461 | 461 | $result = $this->runQueryCallback($query, $bindings, $callback); |
| 462 | - } |
|
| 463 | - catch (QueryException $e) |
|
| 462 | + } catch (QueryException $e) |
|
| 464 | 463 | { |
| 465 | 464 | $result = $this->handleQueryException( |
| 466 | 465 | $e, $query, $bindings, $callback |
@@ -492,8 +491,7 @@ discard block |
||
| 492 | 491 | try |
| 493 | 492 | { |
| 494 | 493 | $result = $callback($query, $bindings); |
| 495 | - } |
|
| 496 | - catch (Exception $e) |
|
| 494 | + } catch (Exception $e) |
|
| 497 | 495 | { |
| 498 | 496 | // throw new QueryException( |
| 499 | 497 | // $query, $this->prepareBindings($bindings), $e |
@@ -517,8 +515,7 @@ discard block |
||
| 517 | 515 | if ($value instanceof DateTime) |
| 518 | 516 | { |
| 519 | 517 | $bindings[$key] = $value->format($this->getQueryGrammar()->getDateFormat()); |
| 520 | - } |
|
| 521 | - elseif (is_bool($value)) |
|
| 518 | + } elseif (is_bool($value)) |
|
| 522 | 519 | { |
| 523 | 520 | $bindings[$key] = (int) $value; |
| 524 | 521 | } |
@@ -63,7 +63,9 @@ |
||
| 63 | 63 | */ |
| 64 | 64 | public function compileInsertGetId(Builder $builder, $values, $sequence) |
| 65 | 65 | { |
| 66 | - if (is_null($sequence)) $sequence = 'id' ; |
|
| 66 | + if (is_null($sequence)) { |
|
| 67 | + $sequence = 'id' ; |
|
| 68 | + } |
|
| 67 | 69 | |
| 68 | 70 | return $this->compileInsert($builder, $values).' returning '.$this->wrap($sequence); |
| 69 | 71 | } |
@@ -299,12 +299,10 @@ discard block |
||
| 299 | 299 | if ($builder instanceof self) |
| 300 | 300 | { |
| 301 | 301 | return [$builder->getSql(), $builder->getBindings()]; |
| 302 | - } |
|
| 303 | - elseif (is_string($builder)) |
|
| 302 | + } elseif (is_string($builder)) |
|
| 304 | 303 | { |
| 305 | 304 | return [$builder->getSql(), []]; |
| 306 | - } |
|
| 307 | - else |
|
| 305 | + } else |
|
| 308 | 306 | { |
| 309 | 307 | throw new InvalidArgumentException('A subquery must be a query builder instance, a Closure, or a string'); |
| 310 | 308 | } |
@@ -446,8 +444,7 @@ discard block |
||
| 446 | 444 | if (is_numeric($key) && is_array($value)) |
| 447 | 445 | { |
| 448 | 446 | $query->{$method}(...array_values($value)); |
| 449 | - } |
|
| 450 | - else |
|
| 447 | + } else |
|
| 451 | 448 | { |
| 452 | 449 | $query->{$method}($key, '=', $value, $boolean); |
| 453 | 450 | } |
@@ -471,8 +468,7 @@ discard block |
||
| 471 | 468 | if ($useDefault) |
| 472 | 469 | { |
| 473 | 470 | return [$operator, '=']; |
| 474 | - } |
|
| 475 | - elseif ($this->invalidOperatorValue($operator, $value)) |
|
| 471 | + } elseif ($this->invalidOperatorValue($operator, $value)) |
|
| 476 | 472 | { |
| 477 | 473 | throw new InvalidArgumentException('Illegal operator and value combination.'); |
| 478 | 474 | } |
@@ -932,8 +928,7 @@ discard block |
||
| 932 | 928 | if ( ! is_array(reset($values))) |
| 933 | 929 | { |
| 934 | 930 | $values = [$values]; |
| 935 | - } |
|
| 936 | - else |
|
| 931 | + } else |
|
| 937 | 932 | { |
| 938 | 933 | foreach ($values as $key => $value) |
| 939 | 934 | { |
@@ -1296,8 +1291,7 @@ discard block |
||
| 1296 | 1291 | if (is_array($value)) |
| 1297 | 1292 | { |
| 1298 | 1293 | $this->bindings[$type] = array_values(array_merge($this->bindings[$type], $value)); |
| 1299 | - } |
|
| 1300 | - else |
|
| 1294 | + } else |
|
| 1301 | 1295 | { |
| 1302 | 1296 | $this->bindings[$type][] = $value; |
| 1303 | 1297 | } |
@@ -619,8 +619,7 @@ |
||
| 619 | 619 | if ($having['type'] === 'raw') |
| 620 | 620 | { |
| 621 | 621 | return $having['boolean'].' '.$having['sql']; |
| 622 | - } |
|
| 623 | - elseif ($having['type'] === 'between') |
|
| 622 | + } elseif ($having['type'] === 'between') |
|
| 624 | 623 | { |
| 625 | 624 | return $this->compileHavingBetween($having); |
| 626 | 625 | } |
@@ -203,8 +203,7 @@ |
||
| 203 | 203 | if ($type === 'read') |
| 204 | 204 | { |
| 205 | 205 | $connection->setPdo($connection->getReadPdo()); |
| 206 | - } |
|
| 207 | - elseif ($type === 'write') |
|
| 206 | + } elseif ($type === 'write') |
|
| 208 | 207 | { |
| 209 | 208 | $connection->setReadPdo($connection->getPdo()); |
| 210 | 209 | } |