/** * @return int|string */ private function showDiffs() { if ($this->stdio->getStdout()->isPosix()) { $diffTemplate = new Template\POSIX(); } else { $diffTemplate = new Template\Text(); } foreach ($this->files as $file) { if ($file->hasDiff() && count($file->getDiff()->getDiffLines())) { $this->stdio->outln('<<ul>>' . $file->getPath() . '<<reset>>:'); $this->stdio->outln($diffTemplate->format($file->getDiff())); } } }