1 | <?php |
||
3 | class PHPCompatibility_Sniffs_PHP_ShortArraySniff extends PHPCompatibility_Sniff |
||
|
|||
4 | { |
||
5 | |||
6 | /** |
||
7 | * Returns an array of tokens this test wants to listen for. |
||
8 | * |
||
9 | * @return array |
||
10 | */ |
||
11 | public function register() |
||
18 | |||
19 | |||
20 | /** |
||
21 | * Processes this test, when one of its tokens is encountered. |
||
22 | * |
||
23 | * @param PHP_CodeSniffer_File $phpcsFile The file being scanned. |
||
24 | * @param int $stackPtr The position of the current token in |
||
25 | * the stack passed in $tokens. |
||
26 | * |
||
27 | * @return void |
||
28 | */ |
||
29 | public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) |
||
50 | |||
51 | }//end class |
||
52 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.