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