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