Documentation

PHP_CodeSniffer_Reports_Summary
in package
implements PHP_CodeSniffer_Report

Summary report for PHP_CodeSniffer.

PHP version 5

Tags
category

PHP

author

Gabriele Santini gsantini@sqli.com

author

Greg Sherwood gsherwood@squiz.net

copyright

2009-2014 SQLI <www.sqli.com>

copyright

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

license

https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence

version

Release: @package_version@

link
http://pear.php.net/package/PHP_CodeSniffer

Interfaces, Classes and Traits

PHP_CodeSniffer_Report
Represents a PHP_CodeSniffer report.

Table of Contents

$recordErrors  : bool
TRUE if this report needs error messages instead of just totals.
$_reportFiles  : bool
An array of process files and their error data.
generate()  : void
Generates a summary of errors and warnings for each file processed.
generateFileReport()  : bool
Generate a partial report for a single processed file.

Properties

$recordErrors

TRUE if this report needs error messages instead of just totals.

public bool $recordErrors = alse

$_reportFiles

An array of process files and their error data.

private bool $_reportFiles = array()

Methods

generate()

Generates a summary of errors and warnings for each file processed.

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

Any partial report data that was returned from generateFileReport during the run.

$totalFiles : int

Total number of files processed during the run.

$totalErrors : int

Total number of errors found during the run.

$totalWarnings : int

Total number of warnings found during the run.

$totalFixable : int

Total number of problems that can be fixed.

$showSources : bool = false

Show sources?

$width : int = 80

Maximum allowed line width.

$toScreen : bool = true

Is the report being printed to screen?

Return values
void

generateFileReport()

Generate a partial report for a single processed file.

public generateFileReport(array<string|int, mixed> $report, PHP_CodeSniffer_File $phpcsFile[, bool $showSources = false ][, int $width = 80 ]) : bool

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.

Parameters
$report : array<string|int, mixed>

Prepared report data.

$phpcsFile : PHP_CodeSniffer_File

The file being reported on.

$showSources : bool = false

Show sources?

$width : int = 80

Maximum allowed line width.

Return values
bool

Search results