Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Sort collected data before running CollectedDataNode rules
  • Loading branch information
mabar committed Jul 21, 2026
commit 1c20ce30e110db4b977ca7c163585073b197b26a
5 changes: 4 additions & 1 deletion src/Analyser/AnalyserResultFinalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
use function array_merge;
use function count;
use function get_class;
use function ksort;
use function sprintf;

#[AutowiredService]
Expand Down Expand Up @@ -44,7 +45,9 @@ public function finalize(AnalyserResult $analyserResult, bool $onlyFiles, bool $
}

$nodeType = CollectedDataNode::class;
$node = new CollectedDataNode($analyserResult->getCollectedData(), $onlyFiles);
$collectedData = $analyserResult->getCollectedData();
ksort($collectedData);
$node = new CollectedDataNode($collectedData, $onlyFiles);

$file = 'N/A';
$scope = $this->scopeFactory->create(ScopeContext::create($file));
Expand Down