1 | <?php |
||
23 | class PHPCompatibility_Sniffs_PHP_ConstantArraysUsingDefineSniff extends PHPCompatibility_Sniff |
||
|
|||
24 | { |
||
25 | |||
26 | /** |
||
27 | * Returns an array of tokens this test wants to listen for. |
||
28 | * |
||
29 | * @return array |
||
30 | */ |
||
31 | public function register() |
||
35 | |||
36 | /** |
||
37 | * Processes this test, when one of its tokens is encountered. |
||
38 | * |
||
39 | * @param PHP_CodeSniffer_File $phpcsFile The file being scanned. |
||
40 | * @param int $stackPtr The position of the current token in the |
||
41 | * stack passed in $tokens. |
||
42 | * |
||
43 | * @return void |
||
44 | */ |
||
45 | public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) |
||
81 | } |
||
82 |
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.