Skip to content

Commit

Permalink
use array_keys in TransformerAbstract
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonasik committed Jan 30, 2019
1 parent b589778 commit a690921
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/Transformer/TransformerAbstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,8 @@ protected static function getDbAdapterConfig(array $configuration) : array
}
}

foreach ($config['adapters'] as $key => $adapterConfig) {
if ($adapterName === $key) {
$config = $adapterConfig;
break;
}
if (in_array($adapterName, \array_keys($config['adapters']), true)) {
$config = $config['adapters'][$adapterName];
}

return $config;
Expand Down

0 comments on commit a690921

Please sign in to comment.