@@ -90,8 +90,7 @@ |
||
90 | 90 | ]; |
91 | 91 | |
92 | 92 | $log = $this->encoder->setCurrentStackTrace($log); |
93 | - } |
|
94 | - else |
|
93 | + } else |
|
95 | 94 | { |
96 | 95 | $log = (array)$message; |
97 | 96 | $log = $this->encoder->setCurrentStackTrace($log); |
@@ -45,8 +45,7 @@ |
||
45 | 45 | $log = [ |
46 | 46 | 'message' => $message |
47 | 47 | ]; |
48 | - } |
|
49 | - else |
|
48 | + } else |
|
50 | 49 | { |
51 | 50 | $log = (array)$message; |
52 | 51 | } |
@@ -152,12 +152,10 @@ |
||
152 | 152 | try |
153 | 153 | { |
154 | 154 | return $this->handler->handle($event); |
155 | - } |
|
156 | - catch (\Throwable $e) |
|
155 | + } catch (\Throwable $e) |
|
157 | 156 | { |
158 | 157 | return false; |
159 | - } |
|
160 | - catch (\Exception $ex) |
|
158 | + } catch (\Exception $ex) |
|
161 | 159 | { |
162 | 160 | return false; |
163 | 161 | } |
@@ -301,17 +301,14 @@ discard block |
||
301 | 301 | if ($value instanceof \DateTimeInterface) |
302 | 302 | { |
303 | 303 | $binding = $value->format('Y-m-d H:i:s'); |
304 | - } |
|
305 | - elseif (is_bool($value)) |
|
304 | + } elseif (is_bool($value)) |
|
306 | 305 | { |
307 | 306 | $binding = (int) $value; |
308 | - } |
|
309 | - else |
|
307 | + } else |
|
310 | 308 | { |
311 | 309 | $binding = (string)$value; |
312 | 310 | } |
313 | - } |
|
314 | - catch (\Exception $e) |
|
311 | + } catch (\Exception $e) |
|
315 | 312 | { |
316 | 313 | $binding = '[handler error]'; |
317 | 314 | } |
@@ -388,8 +385,7 @@ discard block |
||
388 | 385 | try |
389 | 386 | { |
390 | 387 | $queryString[$key] = $this->parseRequestFieldValue($key, $value); |
391 | - } |
|
392 | - catch (\Exception $e) |
|
388 | + } catch (\Exception $e) |
|
393 | 389 | { |
394 | 390 | $queryString[$key] = '[handler error]'; |
395 | 391 | } |
@@ -422,12 +418,10 @@ discard block |
||
422 | 418 | if (method_exists($this->request, 'json') && method_exists($this->request, 'isJson') && $this->request->isJson()) |
423 | 419 | { |
424 | 420 | $source = $this->request->json(); |
425 | - } |
|
426 | - else if ($this->request->request instanceof \IteratorAggregate) |
|
421 | + } else if ($this->request->request instanceof \IteratorAggregate) |
|
427 | 422 | { |
428 | 423 | $source = $this->request->request; |
429 | - } |
|
430 | - else |
|
424 | + } else |
|
431 | 425 | { |
432 | 426 | return; |
433 | 427 | } |
@@ -444,8 +438,7 @@ discard block |
||
444 | 438 | try |
445 | 439 | { |
446 | 440 | $postData[$key] = $this->parseRequestFieldValue($key, $value); |
447 | - } |
|
448 | - catch (\Exception $e) |
|
441 | + } catch (\Exception $e) |
|
449 | 442 | { |
450 | 443 | $postData[$key] = '[handler error]'; |
451 | 444 | } |
@@ -614,10 +607,8 @@ discard block |
||
614 | 607 | { |
615 | 608 | return $userId; |
616 | 609 | } |
617 | - } |
|
618 | - catch (\Throwable $e) |
|
619 | - {} |
|
620 | - catch (\Exception $e) |
|
610 | + } catch (\Throwable $e) |
|
611 | + {} catch (\Exception $e) |
|
621 | 612 | {} |
622 | 613 | |
623 | 614 | try |
@@ -626,10 +617,8 @@ discard block |
||
626 | 617 | { |
627 | 618 | return $user->id; |
628 | 619 | } |
629 | - } |
|
630 | - catch (\Throwable $e) |
|
631 | - {} |
|
632 | - catch (\Exception $e) |
|
620 | + } catch (\Throwable $e) |
|
621 | + {} catch (\Exception $e) |
|
633 | 622 | {} |
634 | 623 | |
635 | 624 | try |
@@ -638,10 +627,8 @@ discard block |
||
638 | 627 | { |
639 | 628 | return $user->id; |
640 | 629 | } |
641 | - } |
|
642 | - catch (\Throwable $e) |
|
643 | - {} |
|
644 | - catch (\Exception $e) |
|
630 | + } catch (\Throwable $e) |
|
631 | + {} catch (\Exception $e) |
|
645 | 632 | {} |
646 | 633 | } |
647 | 634 |
@@ -76,8 +76,7 @@ discard block |
||
76 | 76 | |
77 | 77 | return preg_replace($pattern, $out, $view); |
78 | 78 | }); |
79 | - } |
|
80 | - else |
|
79 | + } else |
|
81 | 80 | { |
82 | 81 | Blade::directive('understandJsConfig', function () |
83 | 82 | { |
@@ -319,8 +318,7 @@ discard block |
||
319 | 318 | { |
320 | 319 | $this->handleEvent($level, $message, $context); |
321 | 320 | }); |
322 | - } |
|
323 | - else |
|
321 | + } else |
|
324 | 322 | { |
325 | 323 | // starting from L5.4 MessageLogged event class was introduced |
326 | 324 | // https://github.com/laravel/framework/commit/57c82d095c356a0fe0f9381536afec768cdcc072 |
@@ -348,8 +346,7 @@ discard block |
||
348 | 346 | $this->app['understand.tokenProvider']->generate(); |
349 | 347 | $this->app['understand.dataCollector']->reset(); |
350 | 348 | }); |
351 | - } |
|
352 | - else |
|
349 | + } else |
|
353 | 350 | { |
354 | 351 | $this->app['events']->listen('Illuminate\Queue\Events\JobProcessing', function() |
355 | 352 | { |
@@ -379,8 +376,7 @@ discard block |
||
379 | 376 | 'time' => $time, |
380 | 377 | ]); |
381 | 378 | }); |
382 | - } |
|
383 | - else |
|
379 | + } else |
|
384 | 380 | { |
385 | 381 | // https://laravel.com/api/5.3/Illuminate/Database/Events/QueryExecuted.html |
386 | 382 | $this->app['events']->listen('Illuminate\Database\Events\QueryExecuted', function($event) |
@@ -422,8 +418,7 @@ discard block |
||
422 | 418 | unset($context['exception']); |
423 | 419 | |
424 | 420 | $this->app['understand.exceptionLogger']->logError($level, $exception, $context); |
425 | - } |
|
426 | - else |
|
421 | + } else |
|
427 | 422 | { |
428 | 423 | $this->app['understand.exceptionLogger']->logError($level, $message, $context); |
429 | 424 | } |
@@ -120,8 +120,7 @@ discard block |
||
120 | 120 | if (strpos($trace['file'], $this->projectRoot . 'vendor' . DIRECTORY_SEPARATOR) === 0) |
121 | 121 | { |
122 | 122 | unset($stackTrace[$index]); |
123 | - } |
|
124 | - else |
|
123 | + } else |
|
125 | 124 | { |
126 | 125 | $vendorExcluded = true; |
127 | 126 | } |
@@ -215,10 +214,8 @@ discard block |
||
215 | 214 | } |
216 | 215 | |
217 | 216 | return $codeLines; |
218 | - } |
|
219 | - catch (\Throwable $e) |
|
220 | - {} |
|
221 | - catch (\Exception $e) |
|
217 | + } catch (\Throwable $e) |
|
218 | + {} catch (\Exception $e) |
|
222 | 219 | {} |
223 | 220 | } |
224 | 221 | |
@@ -294,32 +291,25 @@ discard block |
||
294 | 291 | if (is_array($arg)) |
295 | 292 | { |
296 | 293 | $params[] = 'array(' . count($arg) . ')'; |
297 | - } |
|
298 | - else if (is_object($arg)) |
|
294 | + } else if (is_object($arg)) |
|
299 | 295 | { |
300 | 296 | $params[] = get_class($arg); |
301 | - } |
|
302 | - else if (is_string($arg)) |
|
297 | + } else if (is_string($arg)) |
|
303 | 298 | { |
304 | 299 | $params[] = 'string(' . (strlen($arg) > 70 ? substr($arg, 0, 70) . '...' : $arg) . ')'; |
305 | - } |
|
306 | - else if (is_int($arg)) |
|
300 | + } else if (is_int($arg)) |
|
307 | 301 | { |
308 | 302 | $params[] = 'int(' . $arg . ')'; |
309 | - } |
|
310 | - else if (is_float($arg)) |
|
303 | + } else if (is_float($arg)) |
|
311 | 304 | { |
312 | 305 | $params[] = 'float(' . $arg . ')'; |
313 | - } |
|
314 | - else if (is_bool($arg)) |
|
306 | + } else if (is_bool($arg)) |
|
315 | 307 | { |
316 | 308 | $params[] = 'bool(' . ($arg ? 'true' : 'false') . ')'; |
317 | - } |
|
318 | - else if ($arg instanceof \__PHP_Incomplete_Class) |
|
309 | + } else if ($arg instanceof \__PHP_Incomplete_Class) |
|
319 | 310 | { |
320 | 311 | $params[] = 'object(__PHP_Incomplete_Class)'; |
321 | - } |
|
322 | - else |
|
312 | + } else |
|
323 | 313 | { |
324 | 314 | $params[] = gettype($arg); |
325 | 315 | } |