Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<?php
2
/**
3
 * Squiz_Sniffs_Functions_FunctionDeclarationSniff.
4
 *
5
 * PHP version 5
6
 *
7
 * @category  PHP
8
 * @package   PHP_CodeSniffer
9
 * @author    Greg Sherwood <gsherwood@squiz.net>
10
 * @author    Marc McIntyre <mmcintyre@squiz.net>
11
 * @copyright 2006 Squiz Pty Ltd (ABN 77 084 670 600)
12
 * @license   http://matrix.squiz.net/developer/tools/php_cs/licence BSD Licence
13
 * @version   CVS: $Id: FunctionDeclarationSniff.php 274897 2009-01-29 23:39:52Z squiz $
14
 * @link      http://pear.php.net/package/PHP_CodeSniffer
15
 */
16
 
17
if (class_exists('PHP_CodeSniffer_Standards_AbstractPatternSniff', true) === false) {
18
    throw new PHP_CodeSniffer_Exception('Class PHP_CodeSniffer_Standards_AbstractPatternSniff not found');
19
}
20
 
21
/**
22
 * Squiz_Sniffs_Functions_FunctionDeclarationSniff.
23
 *
24
 * Checks the function declaration is correct.
25
 *
26
 * @category  PHP
27
 * @package   PHP_CodeSniffer
28
 * @author    Greg Sherwood <gsherwood@squiz.net>
29
 * @author    Marc McIntyre <mmcintyre@squiz.net>
30
 * @copyright 2006 Squiz Pty Ltd (ABN 77 084 670 600)
31
 * @license   http://matrix.squiz.net/developer/tools/php_cs/licence BSD Licence
32
 * @version   Release: 1.2.1
33
 * @link      http://pear.php.net/package/PHP_CodeSniffer
34
 */
35
class Squiz_Sniffs_Functions_FunctionDeclarationSniff extends PHP_CodeSniffer_Standards_AbstractPatternSniff
36
{
37
 
38
 
39
    /**
40
     * Returns an array of patterns to check are correct.
41
     *
42
     * @return array
43
     */
44
    protected function getPatterns()
45
    {
46
        return array(
47
                'function abc(...);',
48
                'abstract function abc(...);',
49
               );
50
 
51
    }//end getPatterns()
52
 
53
 
54
}//end class
55
 
56
?>