Skip to content

Commit

Permalink
Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
freekmurze authored and github-actions[bot] committed Feb 12, 2024
1 parent 8f6a193 commit 1cd60ad
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/Models/HealthCheckResultHistoryItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ class HealthCheckResultHistoryItem extends Model
public function getConnectionName(): string
{
return $this->connection ?:
config('health.result_stores.' . EloquentHealthResultStore::class . '.connection') ?:
config('health.result_stores.'.EloquentHealthResultStore::class.'.connection') ?:
config('database.default');
}

public function prunable(): Builder
{
$days = config('health.result_stores.' . EloquentHealthResultStore::class . '.keep_history_for_days') ?? 5;
$days = config('health.result_stores.'.EloquentHealthResultStore::class.'.keep_history_for_days') ?? 5;

return static::where('created_at', '<=', now()->subDays($days));
}
Expand Down
4 changes: 2 additions & 2 deletions tests/Support/DbConnectionInfoTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@

config()->set('health.result_stores', [
EloquentHealthResultStore::class => [
'connection' => 'custom_in_config'
'connection' => 'custom_in_config',
],
]);

expect($model->getConnectionName())->toBe(config('health.result_stores.' . EloquentHealthResultStore::class . '.connection'));
expect($model->getConnectionName())->toBe(config('health.result_stores.'.EloquentHealthResultStore::class.'.connection'));
});
2 changes: 1 addition & 1 deletion tests/TestClasses/CrashingHealthCheckResultHistoryItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@

class CrashingHealthCheckResultHistoryItem extends HealthCheckResultHistoryItem
{
protected $connection = 'custom';
protected $connection = 'custom';
}

0 comments on commit 1cd60ad

Please sign in to comment.