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