GrumPHP\Locator\ChangedFiles::locateFromRawDiffInput PHP Method

locateFromRawDiffInput() public method

public locateFromRawDiffInput ( string $rawDiff ) : FilesCollection
$rawDiff string
return GrumPHP\Collection\FilesCollection
    public function locateFromRawDiffInput($rawDiff)
    {
        $diff = Diff::parse($rawDiff);
        $diff->setRepository($this->repository);
        return $this->parseFilesFromDiff($diff);
    }

Usage Example

Exemplo n.º 1
0
 /**
  * @return FilesCollection
  */
 protected function getCommittedFiles(ConsoleIO $io)
 {
     if ($stdin = $io->readCommandInput()) {
         return $this->changedFilesLocator->locateFromRawDiffInput($stdin);
     }
     return $this->changedFilesLocator->locateFromGitRepository();
 }