Completed
Pull Request — master (#43)
by
unknown
01:29
created
src/Understand/UnderstandLaravel5/FieldProvider.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
      */
235 235
     protected function getSessionId()
236 236
     {
237
-        if ( ! $this->session)
237
+        if (!$this->session)
238 238
         {
239 239
             return null;
240 240
         }
@@ -260,21 +260,21 @@  discard block
 block discarded – undo
260 260
      */
261 261
     protected function getSqlQueries()
262 262
     {
263
-        if ( ! $this->dataCollector)
263
+        if (!$this->dataCollector)
264 264
         {
265 265
             return [];
266 266
         }
267 267
 
268 268
         $queries = $this->dataCollector->getByKey('sql_queries');
269 269
 
270
-        if ( ! $queries)
270
+        if (!$queries)
271 271
         {
272 272
             return null;
273 273
         }
274 274
 
275 275
         $bindingsEnabled = $this->app['config']->get('understand-laravel.sql_bindings');
276 276
 
277
-        foreach($queries as $key => $queryArray)
277
+        foreach ($queries as $key => $queryArray)
278 278
         {
279 279
             if ($bindingsEnabled)
280 280
             {
@@ -296,7 +296,7 @@  discard block
 block discarded – undo
296 296
         $sqlQuery = $queryArray['query'];
297 297
         $placeholder = '?';
298 298
 
299
-        foreach($queryArray['bindings'] as $key => $value)
299
+        foreach ($queryArray['bindings'] as $key => $value)
300 300
         {
301 301
             try
302 302
             {
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
                 }
311 311
                 else
312 312
                 {
313
-                    $binding = (string)$value;
313
+                    $binding = (string) $value;
314 314
                 }
315 315
             }
316 316
             catch (\Exception $e)
@@ -336,7 +336,7 @@  discard block
 block discarded – undo
336 336
      */
337 337
     protected function getRouteName()
338 338
     {
339
-        if ( ! $this->router)
339
+        if (!$this->router)
340 340
         {
341 341
             return null;
342 342
         }
@@ -351,16 +351,16 @@  discard block
 block discarded – undo
351 351
      */
352 352
     protected function getUrl()
353 353
     {
354
-        if ( ! $this->request)
354
+        if (!$this->request)
355 355
         {
356 356
             return null;
357 357
         }
358 358
 
359 359
         $url = $this->request->path();
360 360
 
361
-        if ( ! Str::startsWith($url, '/'))
361
+        if (!Str::startsWith($url, '/'))
362 362
         {
363
-            $url = '/' . $url;
363
+            $url = '/'.$url;
364 364
         }
365 365
 
366 366
         return $url;
@@ -373,19 +373,19 @@  discard block
 block discarded – undo
373 373
     {
374 374
         $enabled = $this->app['config']->get('understand-laravel.query_string_enabled');
375 375
 
376
-        if ( ! $enabled)
376
+        if (!$enabled)
377 377
         {
378 378
             return null;
379 379
         }
380 380
 
381
-        if ( ! $this->request->query instanceof \IteratorAggregate)
381
+        if (!$this->request->query instanceof \IteratorAggregate)
382 382
         {
383 383
             return null;
384 384
         }
385 385
 
386 386
         $queryString = [];
387 387
 
388
-        foreach($this->request->query as $key => $value)
388
+        foreach ($this->request->query as $key => $value)
389 389
         {
390 390
             try
391 391
             {
@@ -407,7 +407,7 @@  discard block
 block discarded – undo
407 407
     {
408 408
         $enabled = $this->app['config']->get('understand-laravel.post_data_enabled');
409 409
 
410
-        if ( ! $enabled)
410
+        if (!$enabled)
411 411
         {
412 412
             return null;
413 413
         }
@@ -434,14 +434,14 @@  discard block
 block discarded – undo
434 434
             return;
435 435
         }
436 436
 
437
-        if ( ! $source)
437
+        if (!$source)
438 438
         {
439 439
             return;
440 440
         }
441 441
 
442 442
         $postData = [];
443 443
 
444
-        foreach($source as $key => $value)
444
+        foreach ($source as $key => $value)
445 445
         {
446 446
             try
447 447
             {
@@ -485,7 +485,7 @@  discard block
 block discarded – undo
485 485
             return get_class($value);
486 486
         }
487 487
 
488
-        return (string)$value;
488
+        return (string) $value;
489 489
     }
490 490
 
491 491
     /**
@@ -495,7 +495,7 @@  discard block
 block discarded – undo
495 495
      */
496 496
     protected function getRequestMethod()
497 497
     {
498
-        if ( ! $this->request)
498
+        if (!$this->request)
499 499
         {
500 500
             return null;
501 501
         }
@@ -510,7 +510,7 @@  discard block
 block discarded – undo
510 510
      */
511 511
     protected function getServerIp()
512 512
     {
513
-        if ( ! $this->request)
513
+        if (!$this->request)
514 514
         {
515 515
             return null;
516 516
         }
@@ -525,7 +525,7 @@  discard block
 block discarded – undo
525 525
      */
526 526
     protected function getClientIp()
527 527
     {
528
-        if ( ! $this->request)
528
+        if (!$this->request)
529 529
         {
530 530
             return null;
531 531
         }
@@ -540,7 +540,7 @@  discard block
 block discarded – undo
540 540
      */
541 541
     protected function getClientUserAgent()
542 542
     {
543
-        if ( ! $this->request)
543
+        if (!$this->request)
544 544
         {
545 545
             return null;
546 546
         }
@@ -566,7 +566,7 @@  discard block
 block discarded – undo
566 566
      */
567 567
     protected function getFromSession($key)
568 568
     {
569
-        if ( ! $this->session)
569
+        if (!$this->session)
570 570
         {
571 571
             return null;
572 572
         }
@@ -584,7 +584,7 @@  discard block
 block discarded – undo
584 584
     {
585 585
         $parts = [];
586 586
 
587
-        foreach(['class', 'file', 'line', 'code'] as $field)
587
+        foreach (['class', 'file', 'line', 'code'] as $field)
588 588
         {
589 589
             // only include `code` if it's not null value
590 590
             // the `code` attribute of the exception object is useful to differentiate SQL and other exceptions
@@ -597,7 +597,7 @@  discard block
 block discarded – undo
597 597
                 continue;
598 598
             }
599 599
 
600
-            $parts[] = isset($log[$field]) ? (string)$log[$field] : null;
600
+            $parts[] = isset($log[$field]) ? (string) $log[$field] : null;
601 601
         }
602 602
 
603 603
         return sha1(implode('#', $parts));
Please login to merge, or discard this patch.