apidoc
[ class tree: apidoc ] [ index: apidoc ] [ all elements ]

Class: VersionControl

Source Location: /PHP_CodeSniffer-3.1.1/src/Reports/VersionControl.php

Class Overview


Version control report base class for PHP_CodeSniffer.


Author(s):

Copyright:

  • 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600)

Variables

Methods


Child classes:

Hgblame
Mercurial blame report for PHP_CodeSniffer.
Svnblame
SVN blame report for PHP_CodeSniffer.
Gitblame
Git blame report for PHP_CodeSniffer.

Inherited Variables

Inherited Methods


Class Details

[line 16]
Version control report base class for PHP_CodeSniffer.


[ Top ]


Class Variables

$reportName =  'VERSION CONTROL'

[line 24]

The name of the report we want in the output.
  • Access: protected

Type:   string


[ Top ]



Method Detail

generate   [line 150]

void generate( string $cachedData, int $totalFiles, int $totalErrors, int $totalWarnings, int $totalFixable, [bool $showSources = false], [int $width = 80], [bool $interactive = false], [bool $toScreen = true])

Prints the author of all errors and warnings, as given by "version control blame".
  • Access: public

Parameters:

string   $cachedData   —  Any partial report data that was returned from generateFileReport during the run.
int   $totalFiles   —  Total number of files processed during the run.
int   $totalErrors   —  Total number of errors found during the run.
int   $totalWarnings   —  Total number of warnings found during the run.
int   $totalFixable   —  Total number of problems that can be fixed.
bool   $showSources   —  Show sources?
int   $width   —  Maximum allowed line width.
bool   $interactive   —  Are we running in interactive mode?
bool   $toScreen   —  Is the report being printed to screen?

[ Top ]

generateFileReport   [line 41]

bool generateFileReport( array $report, File $phpcsFile, [bool $showSources = false], [int $width = 80])

Generate a partial report for a single processed file.

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.

  • Access: public

Parameters:

array   $report   —  Prepared report data.
\PHP_CodeSniffer\File   $phpcsFile   —  The file being reported on.
bool   $showSources   —  Show sources?
int   $width   —  Maximum allowed line width.

[ Top ]

getAuthor   [line 363]

mixed getAuthor( string $line)

Extract the author from a blame line.
  • Return: string or false if impossible to recover.
  • Abstract:
  • Access: protected

Overridden in child classes as:

Hgblame::getAuthor()
Extract the author from a blame line.
Svnblame::getAuthor()
Extract the author from a blame line.
Gitblame::getAuthor()
Extract the author from a blame line.

Parameters:

string   $line   —  Line to parse.

[ Top ]

getBlameContent   [line 373]

array getBlameContent( string $filename)

Gets the blame output.
  • Abstract:
  • Access: protected

Overridden in child classes as:

Hgblame::getBlameContent()
Gets the blame output.
Svnblame::getBlameContent()
Gets the blame output.
Gitblame::getBlameContent()
Gets the blame output.

Parameters:

string   $filename   —  File to blame.

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:27:52 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.