Skip to content

Commit

Permalink
Clean code
Browse files Browse the repository at this point in the history
  • Loading branch information
dcotelo committed Dec 9, 2019
1 parent 187372a commit 4a85c23
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/Extentions/DatabaseManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,10 @@ class DatabaseManager extends BaseDatabaseManager
{
protected function configuration($name)
{
// аргумент $name содержит название подключения
// по названию подключения находим и возвращаем соответствующий конфиг

$dbconf = Config::get("database.connections." . $name);
//if db driver is vault we get it from rest api / cache
if ($dbconf['driver'] == 'secret-db') {
//if db driver is secret we get it from rest api / cache
if ($dbconf['driver'] == 'secret') {
$config = $this->getSecret($name);
if (is_null($config)) {
//check if config is in cache
Expand Down Expand Up @@ -49,7 +47,6 @@ protected function configuration($name)
public function getSecret($secret)
{
$cacheKey = "database-config-" . $secret;
$cacheKeyBackUp = "database-config-" . $secret;
$CacheMinutes = Config::get("secret.chache");
$expiresIn = now()->addMinutes($CacheMinutes);

Expand Down

0 comments on commit 4a85c23

Please sign in to comment.