1 | <?php |
||
23 | class CodingStandard_Sniffs_Files_OneTraitPerFileSniff implements PHP_CodeSniffer_Sniff |
||
1 ignored issue
–
show
|
|||
24 | { |
||
25 | |||
26 | |||
27 | /** |
||
28 | * Returns an array of tokens this test wants to listen for. |
||
29 | * |
||
30 | * @return integer[] |
||
31 | */ |
||
32 | public function register() |
||
37 | |||
38 | |||
39 | /** |
||
40 | * Processes this sniff, when one of its tokens is encountered. |
||
41 | * |
||
42 | * @param PHP_CodeSniffer_File $phpcsFile The file being scanned. |
||
43 | * @param int $stackPtr The position of the current token in |
||
44 | * the stack passed in $tokens. |
||
45 | * |
||
46 | * @return void |
||
47 | */ |
||
48 | public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) |
||
57 | |||
58 | |||
59 | }//end class |
||
60 |
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.