Skip to content

Commit ef85ec8

Browse files
Scrutinizer Auto-Fixes
This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
1 parent d12f87f commit ef85ec8

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

src/Rap2hpoutre/LaravelEpilog/LaravelEpilogServiceProvider.php

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,25 @@ class LaravelEpilogServiceProvider extends ServiceProvider
1414
public function boot()
1515
{
1616
$this->publishes(array(
17-
__DIR__.'/../../config/config.php' => config_path('epilog.php')
17+
__DIR__ . '/../../config/config.php' => config_path('epilog.php')
1818
));
1919

2020
$logger = \Log::getMonolog();
2121

22-
$logger->pushProcessor(function ($record) {
22+
$logger->pushProcessor(function($record) {
2323
$info = "\n---\n";
2424
if (\Auth::check()) {
2525
$info .= 'User #' . \Auth::user()->id . ' (' . \Auth::user()->email . ') - ';
2626
}
27-
if (isset($_SERVER['REMOTE_ADDR'])) $info .= 'IP: ' . $_SERVER['REMOTE_ADDR'];
28-
if (isset($_SERVER['REQUEST_URI'])) $info .= "\n" . $_SERVER['REQUEST_METHOD'] . " " . url($_SERVER['REQUEST_URI']);
29-
if (isset($_SERVER['HTTP_REFERER'])) $info .= "\nReferer: " . $_SERVER['HTTP_REFERER'];
27+
if (isset($_SERVER['REMOTE_ADDR'])) {
28+
$info .= 'IP: ' . $_SERVER['REMOTE_ADDR'];
29+
}
30+
if (isset($_SERVER['REQUEST_URI'])) {
31+
$info .= "\n" . $_SERVER['REQUEST_METHOD'] . " " . url($_SERVER['REQUEST_URI']);
32+
}
33+
if (isset($_SERVER['HTTP_REFERER'])) {
34+
$info .= "\nReferer: " . $_SERVER['HTTP_REFERER'];
35+
}
3036
$info .= "\n---";
3137
if (strpos($record['message'], "\n")) {
3238
$record['message'] = preg_replace("/\n/", $info . "\n", $record['message'], 1);

0 commit comments

Comments
 (0)