Skip to content

Commit

Permalink
Merge pull request #129 from jeremykenedy/analysis-Yje2xd
Browse files Browse the repository at this point in the history
Apply fixes from StyleCI
  • Loading branch information
jeremykenedy authored Nov 25, 2021
2 parents bd4d684 + b46dc73 commit 5d230c1
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/App/Http/Traits/ActivityLogger.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public static function activity($description = null, $details = null)
if (Crawler::isCrawler()) {
$userType = trans('LaravelLogger::laravel-logger.userTypes.crawler');
if (is_null($description)) {
$description = $userType . ' ' . trans('LaravelLogger::laravel-logger.verbTypes.crawled') . ' ' . Request::fullUrl();
$description = $userType.' '.trans('LaravelLogger::laravel-logger.verbTypes.crawled').' '.Request::fullUrl();
}
}

Expand All @@ -57,13 +57,13 @@ public static function activity($description = null, $details = null)
break;
}

$description = $verb . ' ' . Request::path();
$description = $verb.' '.Request::path();
}

if (isset($_SERVER["HTTP_CF_CONNECTING_IP"])) {
$ip = $_SERVER["HTTP_CF_CONNECTING_IP"];
} elseif (isset($_SERVER["HTTP_X_FORWARDED_FOR"])) {
$ip = $_SERVER["HTTP_X_FORWARDED_FOR"];
if (isset($_SERVER['HTTP_CF_CONNECTING_IP'])) {
$ip = $_SERVER['HTTP_CF_CONNECTING_IP'];
} elseif (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
} else {
$ip = Request::ip();
}
Expand All @@ -86,7 +86,7 @@ public static function activity($description = null, $details = null)
if ($validator->fails()) {
$errors = self::prepareErrorMessage($validator->errors(), $data);
if (config('LaravelLogger.logDBActivityLogFailuresToFile')) {
Log::error('Failed to record activity event. Failed Validation: ' . $errors);
Log::error('Failed to record activity event. Failed Validation: '.$errors);
}
} else {
self::storeActivity($data);
Expand Down

0 comments on commit 5d230c1

Please sign in to comment.