Skip to content

Commit

Permalink
Fix coding style issues
Browse files Browse the repository at this point in the history
  • Loading branch information
cracksalad committed Apr 7, 2024
1 parent 2493730 commit d2b2a67
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/Monolog/Handler/DeduplicationHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function flush(): void

$gc = false;
$store = null;

if (file_exists($this->deduplicationStore)) {
$store = file($this->deduplicationStore, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
if (is_array($store)) {
Expand All @@ -83,7 +83,7 @@ public function flush(): void
}
}
}

$passthru = null;

foreach ($this->buffer as $record) {
Expand Down Expand Up @@ -129,11 +129,12 @@ protected function isDuplicate(array $store, LogRecord $record): bool

return false;
}

/**
* @return string The given record serialized as a single line of text
*/
protected function buildDeduplicationStoreEntry(LogRecord $record): string {
protected function buildDeduplicationStoreEntry(LogRecord $record): string
{
return $record->datetime->getTimestamp() . ':' . $record->level->getName() . ':' . preg_replace('{[\r\n].*}', '', $record->message);
}

Expand Down

0 comments on commit d2b2a67

Please sign in to comment.