Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<?php
2
/**
3
 * This sniff class detectes empty statement.
4
 *
5
 * PHP version 5
6
 *
7
 * @category  PHP
8
 * @package   PHP_CodeSniffer
9
 * @author    Greg Sherwood <gsherwood@squiz.net>
10
 * @copyright 2006 Squiz Pty Ltd (ABN 77 084 670 600)
11
 * @license   http://matrix.squiz.net/developer/tools/php_cs/licence BSD Licence
12
 * @version   Release: 1.2.1
13
 * @link      http://pear.php.net/package/PHP_CodeSniffer
14
 */
15
 
16
if (class_exists('Generic_Sniffs_CodeAnalysis_EmptyStatementSniff', true) === false) {
17
    throw new PHP_CodeSniffer_Exception('Class Generic_Sniffs_CodeAnalysis_EmptyStatementSniff not found');
18
}
19
 
20
/**
21
 * This sniff class detectes empty statement.
22
 *
23
 * @category  PHP
24
 * @package   PHP_CodeSniffer
25
 * @author    Greg Sherwood <gsherwood@squiz.net>
26
 * @copyright 2006 Squiz Pty Ltd (ABN 77 084 670 600)
27
 * @license   http://matrix.squiz.net/developer/tools/php_cs/licence BSD Licence
28
 * @version   Release: 1.2.1
29
 * @link      http://pear.php.net/package/PHP_CodeSniffer
30
 */
31
class Squiz_Sniffs_CodeAnalysis_EmptyStatementSniff extends Generic_Sniffs_CodeAnalysis_EmptyStatementSniff
32
{
33
 
34
    /**
35
     * List of block tokens that this sniff covers.
36
     *
37
     * The key of this hash identifies the required token while the boolean
38
     * value says mark an error or mark a warning.
39
     *
40
     * @var array
41
     */
42
    protected $checkedTokens = array(
43
                                T_DO      => true,
44
                                T_ELSE    => true,
45
                                T_ELSEIF  => true,
46
                                T_FOR     => true,
47
                                T_FOREACH => true,
48
                                T_IF      => true,
49
                                T_SWITCH  => true,
50
                                T_WHILE   => true,
51
                               );
52
 
53
}//end class
54
 
55
?>