1 | <?php |
||
23 | class PHPCompatibility_Sniffs_PHP_ForbiddenSwitchWithMultipleDefaultBlocksSniff 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() |
||
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 |
||
42 | * in the stack passed in $tokens. |
||
43 | * |
||
44 | * @return void |
||
45 | */ |
||
46 | public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) |
||
71 | |||
72 | }//end class |
||
73 |
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.