Skip to content

Commit 2e084f3

Browse files
Do not sort
1 parent b36a500 commit 2e084f3

File tree

4 files changed

+2
-8
lines changed

4 files changed

+2
-8
lines changed

src/Target/MapBuilder.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
use function array_merge;
1414
use function array_unique;
1515
use function range;
16-
use function sort;
1716
use SebastianBergmann\CodeCoverage\Filter;
1817
use SebastianBergmann\CodeCoverage\StaticAnalysis\FileAnalyser;
1918

@@ -104,8 +103,6 @@ public function build(Filter $filter, FileAnalyser $analyser): array
104103
foreach (array_keys($namespaces) as $namespace) {
105104
foreach (array_keys($namespaces[$namespace]) as $file) {
106105
$namespaces[$namespace][$file] = array_unique($namespaces[$namespace][$file]);
107-
108-
sort($namespaces[$namespace][$file]);
109106
}
110107
}
111108

src/Target/Mapper.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
use function array_merge;
1313
use function array_unique;
14-
use function sort;
1514

1615
/**
1716
* @phpstan-type TargetMap array{namespaces: TargetMapPart, classes: TargetMapPart, classesThatExtendClass: TargetMapPart, classesThatImplementInterface: TargetMapPart, traits: TargetMapPart, methods: TargetMapPart, functions: TargetMapPart, reverseLookup: ReverseLookup}
@@ -55,8 +54,6 @@ public function mapTargets(TargetCollection $targets): array
5554
}
5655

5756
$result[$file] = array_unique(array_merge($result[$file], $lines));
58-
59-
sort($result[$file]);
6057
}
6158
}
6259

tests/tests/Target/MapBuilderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ public function testBuildsMap(): void
3434
'namespaces' => [
3535
'SebastianBergmann\\CodeCoverage\\StaticAnalysis' => [
3636
$file => array_merge(
37-
range(19, 24),
3837
range(26, 31),
3938
range(33, 52),
39+
range(19, 24),
4040
range(54, 56),
4141
),
4242
],

tests/tests/Target/MapperTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,9 @@ public static function provider(): array
100100
'namespace' => [
101101
[
102102
$file => array_merge(
103-
range(19, 24),
104103
range(26, 31),
105104
range(33, 52),
105+
range(19, 24),
106106
range(54, 56),
107107
),
108108
],

0 commit comments

Comments
 (0)