decrease path by one

This commit is contained in:
Tomas Votruba 2019-05-28 22:38:21 +02:00
parent 8b99be3d94
commit 8542fcc812
3 changed files with 4 additions and 4 deletions

View File

@ -63,7 +63,7 @@ final class ConsoleOutputFormatter implements OutputFormatterInterface
$i = 0;
foreach ($fileDiffs as $fileDiff) {
$relativeFilePath = $fileDiff->getSmartFileInfo()->getRelativeFilePath();
$relativeFilePath = $fileDiff->getRelativeFilePath();
$this->symfonyStyle->writeln(sprintf('<options=bold>%d) %s</>', ++$i, $relativeFilePath));
$this->symfonyStyle->newLine();

View File

@ -53,7 +53,7 @@ final class JsonOutputFormatter implements OutputFormatterInterface
ksort($fileDiffs);
foreach ($fileDiffs as $fileDiff) {
$relativeFilePath = $fileDiff->getSmartFileInfo()->getRelativeFilePath();
$relativeFilePath = $fileDiff->getRelativeFilePath();
$errorsArray['file_diffs'][] = [
'file' => $relativeFilePath,

View File

@ -51,9 +51,9 @@ final class FileDiff
return $this->diffConsoleFormatted;
}
public function getSmartFileInfo(): SmartFileInfo
public function getRelativeFilePath(): string
{
return $this->smartFileInfo;
return $this->smartFileInfo->getRelativeFilePath();
}
/**