Completed
Pull Request — master (#38)
by Aivis
03:24
created
src/Understand/UnderstandLaravel5/ExceptionLogger.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -90,8 +90,7 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
src/Understand/UnderstandLaravel5/EventLogger.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,8 +45,7 @@
 block discarded – undo
45 45
             $log = [
46 46
                 'message' => $message
47 47
             ];
48
-        }
49
-        else
48
+        } else
50 49
         {
51 50
             $log = (array)$message;
52 51
         }
Please login to merge, or discard this patch.
src/Understand/UnderstandLaravel5/Logger.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -152,12 +152,10 @@
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
src/Understand/UnderstandLaravel5/ExceptionEncoder.php 1 patch
Braces   +10 added lines, -20 removed lines patch added patch discarded remove patch
@@ -120,8 +120,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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(' . $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
             }
Please login to merge, or discard this patch.
src/Understand/UnderstandLaravel5/FieldProvider.php 1 patch
Braces   +11 added lines, -22 removed lines patch added patch discarded remove patch
@@ -301,17 +301,14 @@  discard block
 block discarded – undo
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
 block discarded – undo
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,8 +418,7 @@  discard block
 block discarded – undo
422 418
             try
423 419
             {
424 420
                 $postData[$key] = $this->parseRequestFieldValue($key, $value);
425
-            }
426
-            catch (\Exception $e)
421
+            } catch (\Exception $e)
427 422
             {
428 423
                 $postData[$key] = '[handler error]';
429 424
             }
@@ -592,10 +587,8 @@  discard block
 block discarded – undo
592 587
             {
593 588
                 return $userId;
594 589
             }
595
-        }
596
-        catch (\Throwable $e)
597
-        {}
598
-        catch (\Exception $e)
590
+        } catch (\Throwable $e)
591
+        {} catch (\Exception $e)
599 592
         {}
600 593
 
601 594
         try
@@ -604,10 +597,8 @@  discard block
 block discarded – undo
604 597
             {
605 598
                 return $user->id;
606 599
             }
607
-        }
608
-        catch (\Throwable $e)
609
-        {}
610
-        catch (\Exception $e)
600
+        } catch (\Throwable $e)
601
+        {} catch (\Exception $e)
611 602
         {}
612 603
 
613 604
         try
@@ -616,10 +607,8 @@  discard block
 block discarded – undo
616 607
             {
617 608
                 return $user->id;
618 609
             }
619
-        }
620
-        catch (\Throwable $e)
621
-        {}
622
-        catch (\Exception $e)
610
+        } catch (\Throwable $e)
611
+        {} catch (\Exception $e)
623 612
         {}
624 613
     }
625 614
 
Please login to merge, or discard this patch.
src/Understand/UnderstandLaravel5/UnderstandLaravel5ServiceProvider.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -237,8 +237,7 @@  discard block
 block discarded – undo
237 237
             {
238 238
                 $this->handleEvent($level, $message, $context);
239 239
             });
240
-        }
241
-        else
240
+        } else
242 241
         {
243 242
             // starting from L5.4 MessageLogged event class was introduced
244 243
             // https://github.com/laravel/framework/commit/57c82d095c356a0fe0f9381536afec768cdcc072
@@ -266,8 +265,7 @@  discard block
 block discarded – undo
266 265
                     $this->app['understand.tokenProvider']->generate();
267 266
                     $this->app['understand.dataCollector']->reset();
268 267
                 });
269
-            }
270
-            else
268
+            } else
271 269
             {
272 270
                 $this->app['events']->listen('Illuminate\Queue\Events\JobProcessing', function()
273 271
                 {
@@ -297,8 +295,7 @@  discard block
 block discarded – undo
297 295
                     'time' => $time,
298 296
                 ]);
299 297
             });
300
-        }
301
-        else
298
+        } else
302 299
         {
303 300
             // https://laravel.com/api/5.3/Illuminate/Database/Events/QueryExecuted.html
304 301
             $this->app['events']->listen('Illuminate\Database\Events\QueryExecuted', function($event)
@@ -340,8 +337,7 @@  discard block
 block discarded – undo
340 337
             unset($context['exception']);
341 338
 
342 339
             $this->app['understand.exceptionLogger']->logError($level, $exception, $context);
343
-        }
344
-        else
340
+        } else
345 341
         {
346 342
             $this->app['understand.exceptionLogger']->logError($level, $message, $context);
347 343
         }
Please login to merge, or discard this patch.