annotate vendor/squizlabs/php_codesniffer/src/Reports/Report.php @ 4:a9cd425dd02b

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