/** * @return Diff */ public static function parse($rawDiff) { $parser = new DiffParser(); $parser->parse($rawDiff); return new Diff($parser->files, $rawDiff); }
/** * Get the diff in a usable form. * * @return \StyleCI\StyleCI\Presenters\Diff */ protected function diff() { $diff = $this->raw_diff(); if (!is_string($diff)) { $diff = ''; } $parser = new DiffParser(); $parser->parse($diff); return new Diff($parser->files); }