mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-25 09:03:48 +00:00
!fixup fix rector rule
This commit is contained in:
@@ -96,6 +96,7 @@ class ChillBundleAddNormalizationMethodsOnExportRector extends AbstractRector
|
||||
}
|
||||
}
|
||||
|
||||
$toAddBefore = [];
|
||||
$toAdd = [];
|
||||
|
||||
$stmtBefore = array_slice($node->stmts, 0, $buildFormStmtIndex, false);
|
||||
@@ -114,9 +115,9 @@ class ChillBundleAddNormalizationMethodsOnExportRector extends AbstractRector
|
||||
},
|
||||
false,
|
||||
)) {
|
||||
array_unshift($stmtBefore, new Node\Stmt\TraitUse([
|
||||
$toAddBefore[] = new Node\Stmt\TraitUse([
|
||||
new Node\Name('\\'.ExportDataNormalizerTrait::class),
|
||||
]));
|
||||
]);
|
||||
}
|
||||
|
||||
// if we do not have the `getNormalizerVersion` method
|
||||
@@ -134,6 +135,7 @@ class ChillBundleAddNormalizationMethodsOnExportRector extends AbstractRector
|
||||
}
|
||||
|
||||
$node->stmts = [
|
||||
...array_values($toAddBefore),
|
||||
...array_values($stmtBefore),
|
||||
$buildForm,
|
||||
...array_values($toAdd),
|
||||
|
Reference in New Issue
Block a user