Skip to content

Commit 6f19bf0

Browse files
committed
Fix code smell
1 parent 7c7760b commit 6f19bf0

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

setup/src/Magento/Setup/Controller/DatabaseCheck.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
use Zend\Mvc\Controller\AbstractActionController;
1212
use Zend\View\Model\JsonModel;
1313

14+
/**
15+
* Class DatabaseCheck
16+
*/
1417
class DatabaseCheck extends AbstractActionController
1518
{
1619
/**
@@ -66,6 +69,8 @@ public function indexAction()
6669
}
6770

6871
/**
72+
* Is Driver Options Given
73+
*
6974
* @param array $params
7075
* @return bool
7176
*/

setup/src/Magento/Setup/Model/ConfigOptionsList.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,17 @@ public function __construct(
6565
DbValidator $dbValidator,
6666
DriverOptions $driverOptions = null
6767
) {
68+
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
6869
$this->configGenerator = $configGenerator;
6970
$this->dbValidator = $dbValidator;
7071
foreach ($this->configOptionsListClasses as $className) {
71-
$this->configOptionsCollection[] = \Magento\Framework\App\ObjectManager::getInstance()->get($className);
72+
$this->configOptionsCollection[] = $objectManager->get($className);
7273
}
73-
$this->driverOptions = $driverOptions ?? \Magento\Framework\App\ObjectManager::getInstance()->get(DriverOptions::class);
74+
$this->driverOptions = $driverOptions ?? $objectManager->get(DriverOptions::class);
7475
}
7576

7677
/**
77-
* {@inheritdoc}
78+
* @inheritdoc
7879
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
7980
*/
8081
public function getOptions()
@@ -201,7 +202,7 @@ public function getOptions()
201202
}
202203

203204
/**
204-
* {@inheritdoc}
205+
* @inheritdoc
205206
*/
206207
public function createConfig(array $data, DeploymentConfig $deploymentConfig)
207208
{
@@ -225,7 +226,7 @@ public function createConfig(array $data, DeploymentConfig $deploymentConfig)
225226
}
226227

227228
/**
228-
* {@inheritdoc}
229+
* @inheritdoc
229230
*/
230231
public function validate(array $options, DeploymentConfig $deploymentConfig)
231232
{

0 commit comments

Comments
 (0)