mirror of
https://github.com/danog/psalm.git
synced 2024-11-27 04:45:20 +01:00
Make the ordering for file manipulations strict as possible
This commit is contained in:
parent
940534992e
commit
0fcba8547c
@ -924,7 +924,7 @@ class Codebase
|
||||
function (FileManipulation $a, FileManipulation $b) {
|
||||
if ($a->start === $b->start) {
|
||||
if ($b->end === $a->end) {
|
||||
return 0;
|
||||
return $b->insertion_text > $a->insertion_text ? 1 : -1;
|
||||
}
|
||||
|
||||
return $b->end > $a->end ? 1 : -1;
|
||||
|
@ -681,8 +681,8 @@ class FileManipulationTest extends TestCase
|
||||
echo $a;
|
||||
echo $b;',
|
||||
'<?php
|
||||
$b = null;
|
||||
$a = null;
|
||||
$b = null;
|
||||
if (rand(0, 1)) {
|
||||
$a = 1;
|
||||
$b = 2;
|
||||
|
Loading…
Reference in New Issue
Block a user