Skip to content

Commit

Permalink
Run Linter
Browse files Browse the repository at this point in the history
  • Loading branch information
PineappleIOnic committed May 7, 2024
1 parent cb79258 commit cc8e03b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/Logger/Logger.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public function addLog(Log $log): int
throw new Exception('Log is not ready to be pushed.');
}

if (!is_null($this->samplePercent)) {
if (! is_null($this->samplePercent)) {
if (rand(0, 100) <= $this->samplePercent) {
return 0;
}
Expand Down Expand Up @@ -99,11 +99,12 @@ public static function hasProvider(string $providerName): bool

/**
* Return only a sample of the logs from this logger
*
* @param float $sample Total percentage of issues to use with 100% being 1
*
* @param float $sample Total percentage of issues to use with 100% being 1
* @return void
*/
public function sample(float $sample) {
public function sample(float $sample)
{
$this->samplePercent = $sample * 100;
}
}

0 comments on commit cc8e03b

Please sign in to comment.