Skip to content

Commit

Permalink
Fix code styling
Browse files Browse the repository at this point in the history
  • Loading branch information
timacdonald authored and github-actions[bot] committed Jul 25, 2024
1 parent 8345ea5 commit 572951b
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 36 deletions.
60 changes: 30 additions & 30 deletions tests/Feature/Recorders/ExceptionsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,50 +115,50 @@
it('can sample', function () {
Config::set('pulse.recorders.'.Exceptions::class.'.sample_rate', 0.1);

report(new MyReportedException());
report(new MyReportedException());
report(new MyReportedException());
report(new MyReportedException());
report(new MyReportedException());
report(new MyReportedException());
report(new MyReportedException());
report(new MyReportedException());
report(new MyReportedException());
report(new MyReportedException());
report(new MyReportedException);
report(new MyReportedException);
report(new MyReportedException);
report(new MyReportedException);
report(new MyReportedException);
report(new MyReportedException);
report(new MyReportedException);
report(new MyReportedException);
report(new MyReportedException);
report(new MyReportedException);

expect(Pulse::ingest())->toEqualWithDelta(1, 4);
});

it('can sample at zero', function () {
Config::set('pulse.recorders.'.Exceptions::class.'.sample_rate', 0);

report(new MyReportedException());
report(new MyReportedException());
report(new MyReportedException());
report(new MyReportedException());
report(new MyReportedException());
report(new MyReportedException());
report(new MyReportedException());
report(new MyReportedException());
report(new MyReportedException());
report(new MyReportedException());
report(new MyReportedException);
report(new MyReportedException);
report(new MyReportedException);
report(new MyReportedException);
report(new MyReportedException);
report(new MyReportedException);
report(new MyReportedException);
report(new MyReportedException);
report(new MyReportedException);
report(new MyReportedException);

expect(Pulse::ingest())->toBe(0);
});

it('can sample at one', function () {
Config::set('pulse.recorders.'.Exceptions::class.'.sample_rate', 1);

report(new MyReportedException());
report(new MyReportedException());
report(new MyReportedException());
report(new MyReportedException());
report(new MyReportedException());
report(new MyReportedException());
report(new MyReportedException());
report(new MyReportedException());
report(new MyReportedException());
report(new MyReportedException());
report(new MyReportedException);
report(new MyReportedException);
report(new MyReportedException);
report(new MyReportedException);
report(new MyReportedException);
report(new MyReportedException);
report(new MyReportedException);
report(new MyReportedException);
report(new MyReportedException);
report(new MyReportedException);

expect(Pulse::ingest())->toBe(10);
});
Expand Down
2 changes: 1 addition & 1 deletion tests/Feature/RedisTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ function prepareForDriver($driver)
->output();
[$firstEntryKey, $lastEntryKey] = collect(explode("\n", $output))->only([17, 21])->values();

$commands = captureRedisCommands(fn () => $ingest->digest(new StorageFake()));
$commands = captureRedisCommands(fn () => $ingest->digest(new StorageFake));

expect($commands)->toContain('"XRANGE" "laravel_database_laravel:pulse:ingest" "-" "+" "COUNT" "567"');
expect($commands)->toContain('"XDEL" "laravel_database_laravel:pulse:ingest" "'.$firstEntryKey.'" "'.$lastEntryKey.'"');
Expand Down
10 changes: 5 additions & 5 deletions tests/StorageFake.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function purge(?array $types = null): void
*/
public function values(string $type, ?array $keys = null): Collection
{
return new Collection();
return new Collection;
}

/**
Expand All @@ -74,7 +74,7 @@ public function values(string $type, ?array $keys = null): Collection
*/
public function graph(array $types, string $aggregate, CarbonInterval $interval): Collection
{
return new Collection();
return new Collection;
}

/**
Expand All @@ -97,7 +97,7 @@ public function aggregate(
string $direction = 'desc',
int $limit = 101,
): Collection {
return new Collection();
return new Collection;
}

/**
Expand All @@ -114,7 +114,7 @@ public function aggregateTypes(
string $direction = 'desc',
int $limit = 101,
): Collection {
return new Collection();
return new Collection;
}

/**
Expand All @@ -128,6 +128,6 @@ public function aggregateTotal(
string $aggregate,
CarbonInterval $interval,
): Collection {
return new Collection();
return new Collection;
}
}

0 comments on commit 572951b

Please sign in to comment.