mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
!fixup fix rector rule
This commit is contained in:
parent
49f4cce72a
commit
93f934152f
@ -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),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user