Skip to content

Commit e74196e

Browse files
author
Diego
committed
Clean code
1 parent 4ae237d commit e74196e

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/Extentions/DatabaseManager.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,10 @@ class DatabaseManager extends BaseDatabaseManager
1414
{
1515
protected function configuration($name)
1616
{
17-
// аргумент $name содержит название подключения
18-
// по названию подключения находим и возвращаем соответствующий конфиг
1917

2018
$dbconf = Config::get("database.connections." . $name);
21-
//if db driver is vault we get it from rest api / cache
22-
if ($dbconf['driver'] == 'secret-db') {
19+
//if db driver is secret we get it from rest api / cache
20+
if ($dbconf['driver'] == 'secret') {
2321
$config = $this->getSecret($name);
2422
if (is_null($config)) {
2523
//check if config is in cache
@@ -49,7 +47,6 @@ protected function configuration($name)
4947
public function getSecret($secret)
5048
{
5149
$cacheKey = "database-config-" . $secret;
52-
$cacheKeyBackUp = "database-config-" . $secret;
5350
$CacheMinutes = Config::get("secret.chache");
5451
$expiresIn = now()->addMinutes($CacheMinutes);
5552

0 commit comments

Comments
 (0)