Skip to content

Commit c0d920d

Browse files
author
Ash Smith
committed
Fix up code linting
1 parent 199887d commit c0d920d

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

lib/internal/Magento/Framework/Setup/Patch/PatchApplier.php

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
use Magento\Framework\Module\ModuleList;
1111
use Magento\Framework\ObjectManagerInterface;
1212
use Magento\Framework\Phrase;
13-
use Magento\Framework\Setup\Exception;
13+
use Magento\Framework\Setup\Exception as SetupException;
1414
use Magento\Framework\Setup\ModuleDataSetupInterface;
1515

1616
/**
@@ -129,8 +129,8 @@ public function __construct(
129129
/**
130130
* Apply all patches for one module
131131
*
132-
* @param null | string $moduleName
133-
* @throws Exception
132+
* @param null|string $moduleName
133+
* @throws SetupException
134134
*/
135135
public function applyDataPatch($moduleName = null)
136136
{
@@ -149,7 +149,7 @@ public function applyDataPatch($moduleName = null)
149149
['moduleDataSetup' => $this->moduleDataSetup]
150150
);
151151
if (!$dataPatch instanceof DataPatchInterface) {
152-
throw new Exception(
152+
throw new SetupException(
153153
new Phrase("Patch %1 should implement DataPatchInterface", [get_class($dataPatch)])
154154
);
155155
}
@@ -164,7 +164,7 @@ public function applyDataPatch($moduleName = null)
164164
$this->moduleDataSetup->getConnection()->commit();
165165
} catch (\Exception $e) {
166166
$this->moduleDataSetup->getConnection()->rollBack();
167-
throw new Exception(
167+
throw new SetupException(
168168
new Phrase(
169169
'Unable to apply data patch %1 for module %2. Original exception message: %3',
170170
[
@@ -183,8 +183,7 @@ public function applyDataPatch($moduleName = null)
183183
}
184184

185185
/**
186-
* Register all patches in registry in order to manipulate chains and dependencies of patches
187-
* of patches
186+
* Register all patches in registry in order to manipulate chains and dependencies of patches of patches
188187
*
189188
* @param string $moduleName
190189
* @param string $patchType
@@ -217,8 +216,8 @@ private function prepareRegistry($moduleName, $patchType)
217216
*
218217
* Please note: that schema patches are not revertable
219218
*
220-
* @param null | string $moduleName
221-
* @throws Exception
219+
* @param null|string $moduleName
220+
* @throws SetupException
222221
*/
223222
public function applySchemaPatch($moduleName = null)
224223
{
@@ -239,7 +238,7 @@ public function applySchemaPatch($moduleName = null)
239238
$schemaPatch->apply();
240239
$this->patchHistory->fixPatch(get_class($schemaPatch));
241240
} catch (\Exception $e) {
242-
throw new Exception(
241+
throw new SetupException(
243242
new Phrase(
244243
'Unable to apply patch %1 for module %2. Original exception message: %3',
245244
[
@@ -258,8 +257,8 @@ public function applySchemaPatch($moduleName = null)
258257
/**
259258
* Revert data patches for specific module
260259
*
261-
* @param null | string $moduleName
262-
* @throws Exception
260+
* @param null|string $moduleName
261+
* @throws SetupException
263262
*/
264263
public function revertDataPatches($moduleName = null)
265264
{
@@ -280,7 +279,7 @@ public function revertDataPatches($moduleName = null)
280279
$adapter->commit();
281280
} catch (\Exception $e) {
282281
$adapter->rollBack();
283-
throw new Exception(new Phrase($e->getMessage()));
282+
throw new SetupException(new Phrase($e->getMessage()));
284283
} finally {
285284
unset($dataPatch);
286285
}

0 commit comments

Comments
 (0)