1
0
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:
Matthew Brown 2018-01-21 22:01:02 -05:00
parent 940534992e
commit 0fcba8547c
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -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;