Skip to content

Commit d72c7ae

Browse files
author
rostislav
committed
issue-38758 code refactoring ( dev:di:info )
1 parent c90d2dd commit d72c7ae

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

app/code/Magento/Developer/Console/Command/DiInfoCommand.php

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ public function __construct(
5353
?AreaList $areaList = null
5454
)
5555
{
56-
$this->areaList = $areaList ?? \Magento\Framework\App\ObjectManager::getInstance()->get(AreaList::class);
5756
$this->diInformation = $diInformation;
57+
$this->areaList = $areaList ?? \Magento\Framework\App\ObjectManager::getInstance()->get(AreaList::class);
5858
parent::__construct();
5959
}
6060

@@ -208,11 +208,12 @@ private function setDiArea($area): void
208208
if ($this->validateAreaCodeFromInput($area)) {
209209
$objectManager = ObjectManager::getInstance();
210210

211-
$objectManager->configure(
212-
$objectManager
213-
->get(\Magento\Framework\App\ObjectManager\ConfigLoader::class)
214-
->load($area)
215-
);
211+
$areaOmConfiguration = $objectManager
212+
->get(\Magento\Framework\App\ObjectManager\ConfigLoader::class)
213+
->load($area);
214+
215+
$objectManager->configure($areaOmConfiguration);
216+
216217
$objectManager->get(\Magento\Framework\Config\ScopeInterface::class)
217218
->setCurrentScope($area);
218219
} else {

0 commit comments

Comments
 (0)