mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-20 06:38:46 +01:00
naming (#4070)
This commit is contained in:
parent
ff6d6571e6
commit
3226d2d36c
@ -56,10 +56,10 @@ PHP
|
||||
*/
|
||||
public function refactor(Node $node): ?Node
|
||||
{
|
||||
$currentPropertiesOrder = $this->stmtOrder->getStmtsOfTypeOrder($node, ClassConst::class);
|
||||
$propertiesInDesiredOrder = $this->stmtVisibilitySorter->sortConstants($node);
|
||||
$currentClassConstsOrder = $this->stmtOrder->getStmtsOfTypeOrder($node, ClassConst::class);
|
||||
$classConstsInDesiredOrder = $this->stmtVisibilitySorter->sortConstants($node);
|
||||
|
||||
$oldToNewKeys = $this->stmtOrder->createOldToNewKeys($propertiesInDesiredOrder, $currentPropertiesOrder);
|
||||
$oldToNewKeys = $this->stmtOrder->createOldToNewKeys($classConstsInDesiredOrder, $currentClassConstsOrder);
|
||||
|
||||
if (! $this->hasOrderChanged($oldToNewKeys)) {
|
||||
return null;
|
||||
|
Loading…
x
Reference in New Issue
Block a user