~ubuntu-branches/ubuntu/utopic/php-codesniffer/utopic-proposed

« back to all changes in this revision

Viewing changes to PHP_CodeSniffer-1.5.3/CodeSniffer/Standards/Squiz/Tests/Functions/FunctionDeclarationArgumentSpacingUnitTest.php

  • Committer: Package Import Robot
  • Author(s): David Prévot
  • Date: 2014-07-21 14:42:41 UTC
  • mfrom: (1.1.4)
  • Revision ID: package-import@ubuntu.com-20140721144241-g4orlcuk4jzn9mhs
Tags: 1.5.3-1
* Team upload
* Focus on stable release
* Update copyright
* Bump standards version to 3.9.5
* Update Homepage
* Use ${phppear:…} instead of hardcoding them
* Run tests in dh_auto_test
* Update patch with gbp pq
* Simplify configuration installation
* Edit package.xml to move script
* Add DEP-8 tests

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
/**
 
3
 * Unit test class for the FunctionDeclarationArgumentSpacing sniff.
 
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-2014 Squiz Pty Ltd (ABN 77 084 670 600)
 
12
 * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
 
13
 * @link      http://pear.php.net/package/PHP_CodeSniffer
 
14
 */
 
15
 
 
16
/**
 
17
 * Unit test class for the FunctionDeclarationArgumentSpacing sniff.
 
18
 *
 
19
 * A sniff unit test checks a .inc file for expected violations of a single
 
20
 * coding standard. Expected errors and warnings are stored in this class.
 
21
 *
 
22
 * @category  PHP
 
23
 * @package   PHP_CodeSniffer
 
24
 * @author    Greg Sherwood <gsherwood@squiz.net>
 
25
 * @author    Marc McIntyre <mmcintyre@squiz.net>
 
26
 * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
 
27
 * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
 
28
 * @version   Release: 1.5.3
 
29
 * @link      http://pear.php.net/package/PHP_CodeSniffer
 
30
 */
 
31
class Squiz_Tests_Functions_FunctionDeclarationArgumentSpacingUnitTest extends AbstractSniffUnitTest
 
32
{
 
33
 
 
34
 
 
35
    /**
 
36
     * Returns the lines where errors should occur.
 
37
     *
 
38
     * The key of the array should represent the line number and the value
 
39
     * should represent the number of errors that should occur on that line.
 
40
     *
 
41
     * @return array(int => int)
 
42
     */
 
43
    public function getErrorList()
 
44
    {
 
45
        return array(
 
46
                3  => 1,
 
47
                5  => 2,
 
48
                7  => 2,
 
49
                8  => 2,
 
50
                9  => 2,
 
51
                11 => 2,
 
52
                13 => 7,
 
53
                14 => 2,
 
54
                15 => 2,
 
55
                16 => 4,
 
56
                18 => 2,
 
57
                35 => 2,
 
58
                36 => 3,
 
59
                44 => 2,
 
60
                45 => 1,
 
61
                46 => 1,
 
62
                51 => 2,
 
63
                53 => 2,
 
64
                55 => 1,
 
65
                57 => 1,
 
66
               );
 
67
 
 
68
    }//end getErrorList()
 
69
 
 
70
 
 
71
    /**
 
72
     * Returns the lines where warnings should occur.
 
73
     *
 
74
     * The key of the array should represent the line number and the value
 
75
     * should represent the number of warnings that should occur on that line.
 
76
     *
 
77
     * @return array(int => int)
 
78
     */
 
79
    public function getWarningList()
 
80
    {
 
81
        return array();
 
82
 
 
83
    }//end getWarningList()
 
84
 
 
85
 
 
86
}//end class
 
87
 
 
88
?>