PHP Class PHP_CodeSniffer_Reports_VersionControl, PHP_CodeSniffer

PHP version 5
Inheritance: implements PHP_CodeSniffer_Report
Datei anzeigen Open project: squizlabs/php_codesniffer

Protected Properties

Property Type Description
$reportName string The name of the report we want in the output.

Public Methods

Method Description
generate ( string $cachedData, integer $totalFiles, integer $totalErrors, integer $totalWarnings, integer $totalFixable, boolean $showSources = false, integer $width = 80, boolean $toScreen = true ) : void Prints the author of all errors and warnings, as given by "version control blame".
generateFileReport ( array $report, PHP_CodeSniffer_File $phpcsFile, boolean $showSources = false, integer $width = 80 ) : boolean Generate a partial report for a single processed file.

Protected Methods

Method Description
getAuthor ( string $line ) : mixed Extract the author from a blame line.
getBlameContent ( string $filename ) : array Gets the blame output.

Method Details

generate() public method

Prints the author of all errors and warnings, as given by "version control blame".
public generate ( string $cachedData, integer $totalFiles, integer $totalErrors, integer $totalWarnings, integer $totalFixable, boolean $showSources = false, integer $width = 80, boolean $toScreen = true ) : void
$cachedData string Any partial report data that was returned from generateFileReport during the run.
$totalFiles integer Total number of files processed during the run.
$totalErrors integer Total number of errors found during the run.
$totalWarnings integer Total number of warnings found during the run.
$totalFixable integer Total number of problems that can be fixed.
$showSources boolean Show sources?
$width integer Maximum allowed line width.
$toScreen boolean Is the report being printed to screen?
return void

generateFileReport() public method

Function should return TRUE if it printed or stored data about the file and FALSE if it ignored the file. Returning TRUE indicates that the file and its data should be counted in the grand totals.
public generateFileReport ( array $report, PHP_CodeSniffer_File $phpcsFile, boolean $showSources = false, integer $width = 80 ) : boolean
$report array Prepared report data.
$phpcsFile PHP_CodeSniffer_File The file being reported on.
$showSources boolean Show sources?
$width integer Maximum allowed line width.
return boolean

getAuthor() abstract protected method

Extract the author from a blame line.
abstract protected getAuthor ( string $line ) : mixed
$line string Line to parse.
return mixed string or false if impossible to recover.

getBlameContent() abstract protected method

Gets the blame output.
abstract protected getBlameContent ( string $filename ) : array
$filename string File to blame.
return array

Property Details

$reportName protected_oe property

The name of the report we want in the output.
protected string $reportName
return string