| 1 | <?php |
||
| 20 | class PHPCompatibility_Sniffs_Upgrade_Release716Sniff extends PHPCompatibility_Sniff |
||
|
|
|||
| 21 | { |
||
| 22 | /** |
||
| 23 | * Keep track of whether the warning has been thrown yet. |
||
| 24 | * |
||
| 25 | * This warning should only be thrown once per run. |
||
| 26 | * |
||
| 27 | * @var bool |
||
| 28 | */ |
||
| 29 | protected $thrown = false; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * Returns an array of tokens this test wants to listen for. |
||
| 33 | * |
||
| 34 | * @return array |
||
| 35 | */ |
||
| 36 | public function register() |
||
| 42 | |||
| 43 | /** |
||
| 44 | * Processes this test, when one of its tokens is encountered. |
||
| 45 | * |
||
| 46 | * @param PHP_CodeSniffer_File $phpcsFile The file being scanned. |
||
| 47 | * @param int $stackPtr The position of the current token in the |
||
| 48 | * stack passed in $tokens. |
||
| 49 | * |
||
| 50 | * @return void |
||
| 51 | */ |
||
| 52 | public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) |
||
| 67 | } |
||
| 68 |
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.