@@ -995,6 +995,7 @@ private function throwExceptionForNotWritablePaths(array $paths)
995
995
private function handleDBSchemaData ($ setup , $ type , array $ request )
996
996
{
997
997
if (!($ type === 'schema ' || $ type === 'data ' )) {
998
+ // phpcs:ignore Magento2.Exceptions.DirectThrow
998
999
throw new Exception ("Unsupported operation type $ type is requested " );
999
1000
}
1000
1001
$ resource = new \Magento \Framework \Module \ModuleResource ($ this ->context );
@@ -1117,6 +1118,7 @@ private function assertDbConfigExists()
1117
1118
{
1118
1119
$ config = $ this ->deploymentConfig ->get (ConfigOptionsListConstants::CONFIG_PATH_DB_CONNECTION_DEFAULT );
1119
1120
if (!$ config ) {
1121
+ // phpcs:ignore Magento2.Exceptions.DirectThrow
1120
1122
throw new Exception (
1121
1123
"Can't run this operation: configuration for DB connection is absent. "
1122
1124
);
@@ -1193,6 +1195,7 @@ protected function createSchemaDataHandler($className, $interfaceName)
1193
1195
{
1194
1196
if (class_exists ($ className )) {
1195
1197
if (!is_subclass_of ($ className , $ interfaceName ) && $ className !== $ interfaceName ) {
1198
+ // phpcs:ignore Magento2.Exceptions.DirectThrow
1196
1199
throw new Exception ($ className . ' must implement \\' . $ interfaceName );
1197
1200
} else {
1198
1201
return $ this ->objectManagerProvider ->get ()->create ($ className );
@@ -1282,6 +1285,7 @@ public function updateModulesSequence($keepGeneratedFiles = false)
1282
1285
{
1283
1286
$ config = $ this ->deploymentConfig ->get (ConfigOptionsListConstants::KEY_MODULES );
1284
1287
if (!$ config ) {
1288
+ // phpcs:ignore Magento2.Exceptions.DirectThrow
1285
1289
throw new Exception (
1286
1290
"Can't run this operation: deployment configuration is absent. "
1287
1291
. " Run 'magento setup:config:set --help' for options. "
@@ -1579,6 +1583,7 @@ private function getSchemaDataHandler($moduleName, $type)
1579
1583
$ interface = self ::DATA_INSTALL ;
1580
1584
break ;
1581
1585
default :
1586
+ // phpcs:ignore Magento2.Exceptions.DirectThrow
1582
1587
throw new Exception ("$ className does not exist " );
1583
1588
}
1584
1589
@@ -1602,6 +1607,7 @@ private function generateListOfModuleContext($resource, $type)
1602
1607
} elseif ($ type === 'data-version ' ) {
1603
1608
$ dbVer = $ resource ->getDataVersion ($ moduleName );
1604
1609
} else {
1610
+ // phpcs:ignore Magento2.Exceptions.DirectThrow
1605
1611
throw new Exception ("Unsupported version type $ type is requested " );
1606
1612
}
1607
1613
if ($ dbVer !== false ) {
0 commit comments