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

Class: Reporter

Source Location: /PHP_CodeSniffer-3.1.1/src/Reporter.php

Class Overview


Manages reporting of errors and warnings.


Author(s):

Copyright:

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

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 18]
Manages reporting of errors and warnings.


[ Top ]


Class Variables

$config =  null

[line 26]

The config data for the run.
  • Access: public

Type:   \PHP_CodeSniffer\Config


[ Top ]

$startTime =  0

[line 68]

When the PHPCS run started.
  • Access: public

Type:   float


[ Top ]

$totalErrors =  0

[line 40]

Total number of errors found during the run.
  • Access: public

Type:   integer


[ Top ]

$totalFiles =  0

[line 33]

Total number of files that contain errors or warnings.
  • Access: public

Type:   integer


[ Top ]

$totalFixable =  0

[line 54]

Total number of errors/warnings that can be fixed.
  • Access: public

Type:   integer


[ Top ]

$totalFixed =  0

[line 61]

Total number of errors/warnings that were fixed.
  • Access: public

Type:   integer


[ Top ]

$totalWarnings =  0

[line 47]

Total number of warnings found during the run.
  • Access: public

Type:   integer


[ Top ]



Method Detail

__construct (Constructor)   [line 97]

void __construct( Config $config)

Initialise the reporter.

All reports specified in the config will be created and their output file (or a temp file if none is specified) initialised by clearing the current contents.

  • Throws: RuntimeException If a report is not available.
  • Access: public

Parameters:

\PHP_CodeSniffer\Config   $config   —  The config data for the run.

[ Top ]

cacheFileReport   [line 247]

void cacheFileReport( File $phpcsFile)

Caches the result of a single processed file for all reports.

The report content that is generated is appended to the output file assigned to each report. This content may be an intermediate report format and not reflect the final report output.

  • Access: public

Parameters:

\PHP_CodeSniffer\Files\File   $phpcsFile   —  The file that has been processed.

[ Top ]

prepareFileReport   [line 312]

array prepareFileReport( File $phpcsFile)

Generate summary information to be used during report generation.
  • Access: public

Parameters:

\PHP_CodeSniffer\Files\File   $phpcsFile   —  The file that has been processed.

[ Top ]

printReport   [line 176]

void printReport( string $report)

Generates and prints a single final report.
  • Access: public

Parameters:

string   $report   —  The report type to print.

[ Top ]

printReports   [line 153]

bool printReports( )

Generates and prints final versions of all reports.

Returns TRUE if any of the reports output content to the screen or FALSE if all reports were silently printed to a file.

  • Access: public

[ Top ]


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