@@ -266,8 +266,7 @@ discard block |
||
| 266 | 266 | { |
| 267 | 267 | // Laravel |
| 268 | 268 | return Application::VERSION; |
| 269 | - } |
|
| 270 | - else |
|
| 269 | + } else |
|
| 271 | 270 | { |
| 272 | 271 | $re = '/Lumen \((.*)\) \(.*\)/m'; |
| 273 | 272 | |
@@ -327,17 +326,14 @@ discard block |
||
| 327 | 326 | if ($value instanceof \DateTimeInterface) |
| 328 | 327 | { |
| 329 | 328 | $binding = $value->format('Y-m-d H:i:s'); |
| 330 | - } |
|
| 331 | - elseif (is_bool($value)) |
|
| 329 | + } elseif (is_bool($value)) |
|
| 332 | 330 | { |
| 333 | 331 | $binding = (int) $value; |
| 334 | - } |
|
| 335 | - else |
|
| 332 | + } else |
|
| 336 | 333 | { |
| 337 | 334 | $binding = (string)$value; |
| 338 | 335 | } |
| 339 | - } |
|
| 340 | - catch (\Exception $e) |
|
| 336 | + } catch (\Exception $e) |
|
| 341 | 337 | { |
| 342 | 338 | $binding = '[handler error]'; |
| 343 | 339 | } |
@@ -414,8 +410,7 @@ discard block |
||
| 414 | 410 | try |
| 415 | 411 | { |
| 416 | 412 | $queryString[$key] = $this->parseRequestFieldValue($key, $value); |
| 417 | - } |
|
| 418 | - catch (\Exception $e) |
|
| 413 | + } catch (\Exception $e) |
|
| 419 | 414 | { |
| 420 | 415 | $queryString[$key] = '[handler error]'; |
| 421 | 416 | } |
@@ -448,12 +443,10 @@ discard block |
||
| 448 | 443 | if (method_exists($this->request, 'json') && method_exists($this->request, 'isJson') && $this->request->isJson()) |
| 449 | 444 | { |
| 450 | 445 | $source = $this->request->json(); |
| 451 | - } |
|
| 452 | - else if ($this->request->request instanceof \IteratorAggregate) |
|
| 446 | + } else if ($this->request->request instanceof \IteratorAggregate) |
|
| 453 | 447 | { |
| 454 | 448 | $source = $this->request->request; |
| 455 | - } |
|
| 456 | - else |
|
| 449 | + } else |
|
| 457 | 450 | { |
| 458 | 451 | return; |
| 459 | 452 | } |
@@ -470,8 +463,7 @@ discard block |
||
| 470 | 463 | try |
| 471 | 464 | { |
| 472 | 465 | $postData[$key] = $this->parseRequestFieldValue($key, $value); |
| 473 | - } |
|
| 474 | - catch (\Exception $e) |
|
| 466 | + } catch (\Exception $e) |
|
| 475 | 467 | { |
| 476 | 468 | $postData[$key] = '[handler error]'; |
| 477 | 469 | } |
@@ -640,10 +632,8 @@ discard block |
||
| 640 | 632 | { |
| 641 | 633 | return $userId; |
| 642 | 634 | } |
| 643 | - } |
|
| 644 | - catch (\Throwable $e) |
|
| 645 | - {} |
|
| 646 | - catch (\Exception $e) |
|
| 635 | + } catch (\Throwable $e) |
|
| 636 | + {} catch (\Exception $e) |
|
| 647 | 637 | {} |
| 648 | 638 | |
| 649 | 639 | try |
@@ -652,10 +642,8 @@ discard block |
||
| 652 | 642 | { |
| 653 | 643 | return $user->id; |
| 654 | 644 | } |
| 655 | - } |
|
| 656 | - catch (\Throwable $e) |
|
| 657 | - {} |
|
| 658 | - catch (\Exception $e) |
|
| 645 | + } catch (\Throwable $e) |
|
| 646 | + {} catch (\Exception $e) |
|
| 659 | 647 | {} |
| 660 | 648 | |
| 661 | 649 | try |
@@ -664,10 +652,8 @@ discard block |
||
| 664 | 652 | { |
| 665 | 653 | return $user->id; |
| 666 | 654 | } |
| 667 | - } |
|
| 668 | - catch (\Throwable $e) |
|
| 669 | - {} |
|
| 670 | - catch (\Exception $e) |
|
| 655 | + } catch (\Throwable $e) |
|
| 656 | + {} catch (\Exception $e) |
|
| 671 | 657 | {} |
| 672 | 658 | } |
| 673 | 659 | |
@@ -161,8 +161,7 @@ discard block |
||
| 161 | 161 | { |
| 162 | 162 | $this->handleEvent($log['level'], $log['message'], $log['context']); |
| 163 | 163 | }); |
| 164 | - } |
|
| 165 | - else |
|
| 164 | + } else |
|
| 166 | 165 | { |
| 167 | 166 | // starting from Lumen 5.6 MessageLogged event class was introduced |
| 168 | 167 | $this->app['events']->listen('Illuminate\Log\Events\MessageLogged', function ($log) |
@@ -211,8 +210,7 @@ discard block |
||
| 211 | 210 | 'time' => $time, |
| 212 | 211 | ]); |
| 213 | 212 | }); |
| 214 | - } |
|
| 215 | - else |
|
| 213 | + } else |
|
| 216 | 214 | { |
| 217 | 215 | // https://laravel.com/api/5.3/Illuminate/Database/Events/QueryExecuted.html |
| 218 | 216 | $this->app['events']->listen('Illuminate\Database\Events\QueryExecuted', function($event) |
@@ -253,8 +251,7 @@ discard block |
||
| 253 | 251 | unset($context['exception']); |
| 254 | 252 | |
| 255 | 253 | $this->app['understand.exceptionLogger']->logError($level, $exception, $context); |
| 256 | - } |
|
| 257 | - else |
|
| 254 | + } else |
|
| 258 | 255 | { |
| 259 | 256 | $this->app['understand.exceptionLogger']->logError($level, $message, $context); |
| 260 | 257 | } |