Skip to content

Commit

Permalink
Fix deprecated string interpolation style. (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
eric-famiglietti authored Jan 12, 2024
1 parent 14e8da8 commit 0bfae67
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
14 changes: 7 additions & 7 deletions src/Checks/Database.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ public function check(Result $result): Result
$attributes = [];

foreach (['CLIENT_VERSION', 'CONNECTION_STATUS', 'SERVER_INFO', 'SERVER_VERSION'] as $attribute) {
$attributes[$attribute] = $pdo->getAttribute(constant("PDO::ATTR_${attribute}"));
$attributes[$attribute] = $pdo->getAttribute(constant("PDO::ATTR_{$attribute}"));
}

$connection = $this->getConnection();

return $result->pass("Connected to DB (Connection: ${connection})", $attributes);
return $result->pass("Connected to DB (Connection: {$connection})", $attributes);
}

/**
Expand All @@ -46,11 +46,11 @@ protected function boot(): void
$this->requiredConfig = array_merge(
$this->requiredConfig,
[
"database.connections.${connection}.host",
"database.connections.${connection}.port",
"database.connections.${connection}.database",
"database.connections.${connection}.username",
"database.connections.${connection}.password",
"database.connections.{$connection}.host",
"database.connections.{$connection}.port",
"database.connections.{$connection}.database",
"database.connections.{$connection}.username",
"database.connections.{$connection}.password",
]
);
}
Expand Down
6 changes: 3 additions & 3 deletions src/Checks/Redis.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ protected function boot(): void
$this->requiredConfig = array_merge(
$this->requiredConfig,
[
"database.redis.${connection}.host",
"database.redis.${connection}.port",
"database.redis.{$connection}.host",
"database.redis.{$connection}.port",
],
$usesAuth ? [
"database.redis.${connection}.password",
"database.redis.{$connection}.password",
] : []
);
}
Expand Down

0 comments on commit 0bfae67

Please sign in to comment.