1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-21 21:31:13 +01:00

Fix differ to only use available commands

This commit is contained in:
Matthew Brown 2018-01-07 12:09:05 -05:00
parent 456a2ebaaa
commit 05d2c3dcb8

View File

@ -1056,7 +1056,14 @@ class ProjectChecker
if ($docblock_update_count) {
if ($dry_run) {
echo $file_path . ':' . PHP_EOL;
$differ = new \PhpCsFixer\Differ\UnifiedDiffer();
$differ = new \PhpCsFixer\Diff\v2_0\Differ(
new \PhpCsFixer\Diff\GeckoPackages\DiffOutputBuilder\UnifiedDiffOutputBuilder([
'fromFile' => 'Original',
'toFile' => 'New',
])
);
echo (string) $differ->diff($this->getFileContents($file_path), $existing_contents);
return;