1 | <?php |
||
19 | class PHPCompatibility_Sniffs_PHP_MbstringReplaceEModifierSniff extends PHPCompatibility_Sniff |
||
|
|||
20 | { |
||
21 | |||
22 | /** |
||
23 | * Functions to check for. |
||
24 | * |
||
25 | * Key is the function name, value the parameter position of the options parameter. |
||
26 | * |
||
27 | * @var array |
||
28 | */ |
||
29 | protected $functions = array( |
||
30 | 'mb_ereg_replace' => 4, |
||
31 | 'mb_eregi_replace' => 4, |
||
32 | 'mb_regex_set_options' => 1, |
||
33 | ); |
||
34 | |||
35 | |||
36 | /** |
||
37 | * Returns an array of tokens this test wants to listen for. |
||
38 | * |
||
39 | * @return array |
||
40 | */ |
||
41 | public function register() |
||
45 | |||
46 | |||
47 | /** |
||
48 | * Processes this test, when one of its tokens is encountered. |
||
49 | * |
||
50 | * @param PHP_CodeSniffer_File $phpcsFile The file being scanned. |
||
51 | * @param int $stackPtr The position of the current token in the |
||
52 | * stack passed in $tokens. |
||
53 | * |
||
54 | * @return void |
||
55 | */ |
||
56 | public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) |
||
106 | |||
107 | }//end class |
||
108 |
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.