function Svnblame::getBlameContent
Gets the blame output.
Parameters
string $filename File to blame.:
Return value
array
Throws
\PHP_CodeSniffer\Exceptions\DeepExitException
Overrides VersionControl::getBlameContent
File
-
vendor/
squizlabs/ php_codesniffer/ src/ Reports/ Svnblame.php, line 54
Class
Namespace
PHP_CodeSniffer\ReportsCode
protected function getBlameContent($filename) {
$command = 'svn blame "' . $filename . '" 2>&1';
$handle = popen($command, 'r');
if ($handle === false) {
$error = 'ERROR: Could not execute "' . $command . '"' . PHP_EOL . PHP_EOL;
throw new DeepExitException($error, 3);
}
$rawContent = stream_get_contents($handle);
pclose($handle);
$blames = explode("\n", $rawContent);
return $blames;
}