~ubuntu-branches/ubuntu/vivid/php-codesniffer/vivid

« back to all changes in this revision

Viewing changes to PHP_CodeSniffer-1.5.4/CodeSniffer/Report.php

  • Committer: Package Import Robot
  • Author(s): David Prévot, Greg Sherwood, Alexey, Emily, David Prévot
  • Date: 2014-09-26 13:44:35 UTC
  • mfrom: (1.1.6)
  • Revision ID: package-import@ubuntu.com-20140926134435-wvjq16miqq4d60y0
Tags: 1.5.5-1
[ Greg Sherwood ]
* Improved closure support in Generic ScopeIndentSniff
* Improved indented PHP tag support in Generic ScopeIndentSniff
* Standards can now be located within hidden directories
 (further fix for bug #20323)
* Fixed bug #20373 : Inline comment sniff tab handling way
* Fixed bug #20378 : Report appended to existing file if no errors
  found in run
* Fixed bug #20381 : Invalid "Comment closer must be on a new line"
* PHP tokenizer no longer converts class/function names to special
  tokens types
* Fixed bug #20386 : Squiz.Commenting.ClassComment.SpacingBefore
  thrown if first block comment
* Squiz and PEAR FunctionCommentSnif now support _()
* PEAR ValidFunctionNameSniff no longer throws an error for _()
* Fixed bug #248 : FunctionCommentSniff expects ampersand on param name
* Fixed bug #248 in Squiz sniff as well
* Fixed bug #265 : False positives with type hints in ForbiddenFunctionsSniff
* Prepare for 1.5.5 release

[ Alexey ]
* Allowed single undersored methods and functions

[ Emily ]
* Added var_dump to discouraged functions sniff

[ David Prévot ]
* Revert "Add XS-Testsuite still needed for ci.d.n"
* Add self to uploaders
* Bump standards version to 3.9.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
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: 1.5.4
28
 
 * @link      http://pear.php.net/package/PHP_CodeSniffer
29
 
 */
30
 
interface 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 boolean $showSources Show sources?
43
 
     * @param int     $width       Maximum allowed line width.
44
 
     *
45
 
     * @return boolean
46
 
     */
47
 
    public function generateFileReport(
48
 
        $report,
49
 
        $showSources=false,
50
 
        $width=80
51
 
    );
52
 
 
53
 
 
54
 
    /**
55
 
     * Generate the actual report.
56
 
     * 
57
 
     * @param string  $cachedData    Any partial report data that was returned from
58
 
     *                               generateFileReport during the run.
59
 
     * @param int     $totalFiles    Total number of files processed during the run.
60
 
     * @param int     $totalErrors   Total number of errors found during the run.
61
 
     * @param int     $totalWarnings Total number of warnings found during the run.
62
 
     * @param boolean $showSources   Show sources?
63
 
     * @param int     $width         Maximum allowed line width.
64
 
     * @param boolean $toScreen      Is the report being printed to screen?
65
 
     *
66
 
     * @return void
67
 
     */
68
 
    public function generate(
69
 
        $cachedData,
70
 
        $totalFiles,
71
 
        $totalErrors,
72
 
        $totalWarnings,
73
 
        $showSources=false,
74
 
        $width=80,
75
 
        $toScreen=true
76
 
    );
77
 
 
78
 
 
79
 
}//end interface
80
 
 
81
 
?>