Skip to content

Commit 7f9b152

Browse files
committed
fix
1 parent bc8fe7b commit 7f9b152

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

packages/ChangesReporting/ValueObjectFactory/FileDiffFactory.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ public function createFileDiff(File $file, string $oldContent, string $newConten
2727
return $this->createFileDiffWithLineChanges($file, $oldContent, $newContent, $file->getRectorWithLineChanges(), $configuration);
2828
}
2929

30+
public function createTempFileDiff(File $file, Configuration $configuration): FileDiff
31+
{
32+
return $this->createFileDiffWithLineChanges($file, '', '', $file->getRectorWithLineChanges(), $configuration);
33+
}
34+
3035
/**
3136
* @param RectorWithLineChange[] $rectorsWithLineChanges
3237
*/
@@ -44,11 +49,6 @@ public function createFileDiffWithLineChanges(
4449
return $this->factory($file, $oldContent, $newContent, $this->defaultDiffer, $rectorsWithLineChanges);
4550
}
4651

47-
public function createTempFileDiff(File $file, Configuration $configuration): FileDiff
48-
{
49-
return $this->factory($file, '', '', $file->getRectorWithLineChanges(), $configuration);
50-
}
51-
5252
/**
5353
* @param RectorWithLineChange[] $rectorsWithLineChanges
5454
*/

src/Application/FileProcessor/PhpFileProcessor.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public function process(File $file, Configuration $configuration): array
8181
$this->printFile($file, $configuration);
8282

8383
if ($file->hasChanged()) {
84-
$file->setFileDiff($this->fileDiffFactory->createTempFileDiff($file));
84+
$file->setFileDiff($this->fileDiffFactory->createTempFileDiff($file, $configuration));
8585
$rectorWithLineChanges = $file->getRectorWithLineChanges();
8686
}
8787
} while ($file->hasChanged());
@@ -92,7 +92,8 @@ public function process(File $file, Configuration $configuration): array
9292
$file,
9393
$file->getOriginalFileContent(),
9494
$file->getFileContent(),
95-
$rectorWithLineChanges
95+
$rectorWithLineChanges,
96+
$configuration
9697
)
9798
);
9899
}

0 commit comments

Comments
 (0)