コード例 #1
0
 /**
  * @return Diff
  */
 public static function parse($rawDiff)
 {
     $parser = new DiffParser();
     $parser->parse($rawDiff);
     return new Diff($parser->files, $rawDiff);
 }
コード例 #2
0
 /**
  * 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);
 }