annotate vendor/squizlabs/php_codesniffer/CodeSniffer/Report.php @ 0:c75dbcec494b

Initial commit from drush-created site
author Chris Cannam
date Thu, 05 Jul 2018 14:24:15 +0000
parents
children
rev   line source
Chris@0 1 <?php
Chris@0 2 /**
Chris@0 3 * Represents a PHP_CodeSniffer report.
Chris@0 4 *
Chris@0 5 * PHP version 5.
Chris@0 6 *
Chris@0 7 * @category PHP
Chris@0 8 * @package PHP_CodeSniffer
Chris@0 9 * @author Gabriele Santini <gsantini@sqli.com>
Chris@0 10 * @author Greg Sherwood <gsherwood@squiz.net>
Chris@0 11 * @copyright 2009-2014 SQLI <www.sqli.com>
Chris@0 12 * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
Chris@0 13 * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
Chris@0 14 * @link http://pear.php.net/package/PHP_CodeSniffer
Chris@0 15 */
Chris@0 16
Chris@0 17 /**
Chris@0 18 * Represents a PHP_CodeSniffer report.
Chris@0 19 *
Chris@0 20 * @category PHP
Chris@0 21 * @package PHP_CodeSniffer
Chris@0 22 * @author Gabriele Santini <gsantini@sqli.com>
Chris@0 23 * @author Greg Sherwood <gsherwood@squiz.net>
Chris@0 24 * @copyright 2009-2014 SQLI <www.sqli.com>
Chris@0 25 * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
Chris@0 26 * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
Chris@0 27 * @version Release: @package_version@
Chris@0 28 * @link http://pear.php.net/package/PHP_CodeSniffer
Chris@0 29 */
Chris@0 30 interface PHP_CodeSniffer_Report
Chris@0 31 {
Chris@0 32
Chris@0 33
Chris@0 34 /**
Chris@0 35 * Generate a partial report for a single processed file.
Chris@0 36 *
Chris@0 37 * Function should return TRUE if it printed or stored data about the file
Chris@0 38 * and FALSE if it ignored the file. Returning TRUE indicates that the file and
Chris@0 39 * its data should be counted in the grand totals.
Chris@0 40 *
Chris@0 41 * @param array $report Prepared report data.
Chris@0 42 * @param PHP_CodeSniffer_File $phpcsFile The file being reported on.
Chris@0 43 * @param boolean $showSources Show sources?
Chris@0 44 * @param int $width Maximum allowed line width.
Chris@0 45 *
Chris@0 46 * @return boolean
Chris@0 47 */
Chris@0 48 public function generateFileReport(
Chris@0 49 $report,
Chris@0 50 PHP_CodeSniffer_File $phpcsFile,
Chris@0 51 $showSources=false,
Chris@0 52 $width=80
Chris@0 53 );
Chris@0 54
Chris@0 55
Chris@0 56 /**
Chris@0 57 * Generate the actual report.
Chris@0 58 *
Chris@0 59 * @param string $cachedData Any partial report data that was returned from
Chris@0 60 * generateFileReport during the run.
Chris@0 61 * @param int $totalFiles Total number of files processed during the run.
Chris@0 62 * @param int $totalErrors Total number of errors found during the run.
Chris@0 63 * @param int $totalWarnings Total number of warnings found during the run.
Chris@0 64 * @param int $totalFixable Total number of problems that can be fixed.
Chris@0 65 * @param boolean $showSources Show sources?
Chris@0 66 * @param int $width Maximum allowed line width.
Chris@0 67 * @param boolean $toScreen Is the report being printed to screen?
Chris@0 68 *
Chris@0 69 * @return void
Chris@0 70 */
Chris@0 71 public function generate(
Chris@0 72 $cachedData,
Chris@0 73 $totalFiles,
Chris@0 74 $totalErrors,
Chris@0 75 $totalWarnings,
Chris@0 76 $totalFixable,
Chris@0 77 $showSources=false,
Chris@0 78 $width=80,
Chris@0 79 $toScreen=true
Chris@0 80 );
Chris@0 81
Chris@0 82
Chris@0 83 }//end interface