annotate vendor/squizlabs/php_codesniffer/src/Reports/Report.php @ 19:fa3358dc1485 tip

Add ndrum files
author Chris Cannam
date Wed, 28 Aug 2019 13:14:47 +0100
parents 129ea1e6d783
children
rev   line source
Chris@17 1 <?php
Chris@17 2 /**
Chris@17 3 * An interface that PHP_CodeSniffer reports must implement.
Chris@17 4 *
Chris@17 5 * @author Greg Sherwood <gsherwood@squiz.net>
Chris@17 6 * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600)
Chris@17 7 * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
Chris@17 8 */
Chris@17 9
Chris@17 10 namespace PHP_CodeSniffer\Reports;
Chris@17 11
Chris@17 12 use PHP_CodeSniffer\Files\File;
Chris@17 13
Chris@17 14 interface Report
Chris@17 15 {
Chris@17 16
Chris@17 17
Chris@17 18 /**
Chris@17 19 * Generate a partial report for a single processed file.
Chris@17 20 *
Chris@17 21 * Function should return TRUE if it printed or stored data about the file
Chris@17 22 * and FALSE if it ignored the file. Returning TRUE indicates that the file and
Chris@17 23 * its data should be counted in the grand totals.
Chris@17 24 *
Chris@17 25 * @param array $report Prepared report data.
Chris@17 26 * @param \PHP_CodeSniffer\File $phpcsFile The file being reported on.
Chris@17 27 * @param bool $showSources Show sources?
Chris@17 28 * @param int $width Maximum allowed line width.
Chris@17 29 *
Chris@17 30 * @return bool
Chris@17 31 */
Chris@17 32 public function generateFileReport($report, File $phpcsFile, $showSources=false, $width=80);
Chris@17 33
Chris@17 34
Chris@17 35 /**
Chris@17 36 * Generate the actual report.
Chris@17 37 *
Chris@17 38 * @param string $cachedData Any partial report data that was returned from
Chris@17 39 * generateFileReport during the run.
Chris@17 40 * @param int $totalFiles Total number of files processed during the run.
Chris@17 41 * @param int $totalErrors Total number of errors found during the run.
Chris@17 42 * @param int $totalWarnings Total number of warnings found during the run.
Chris@17 43 * @param int $totalFixable Total number of problems that can be fixed.
Chris@17 44 * @param bool $showSources Show sources?
Chris@17 45 * @param int $width Maximum allowed line width.
Chris@17 46 * @param bool $interactive Are we running in interactive mode?
Chris@17 47 * @param bool $toScreen Is the report being printed to screen?
Chris@17 48 *
Chris@17 49 * @return void
Chris@17 50 */
Chris@17 51 public function generate(
Chris@17 52 $cachedData,
Chris@17 53 $totalFiles,
Chris@17 54 $totalErrors,
Chris@17 55 $totalWarnings,
Chris@17 56 $totalFixable,
Chris@17 57 $showSources=false,
Chris@17 58 $width=80,
Chris@17 59 $interactive=false,
Chris@17 60 $toScreen=true
Chris@17 61 );
Chris@17 62
Chris@17 63
Chris@17 64 }//end interface