| 1 | <?php |
||
| 19 | class PHPCompatibility_Sniffs_PHP_NewGroupUseDeclarationsSniff extends PHPCompatibility_Sniff |
||
| 20 | { |
||
| 21 | /** |
||
| 22 | * Returns an array of tokens this test wants to listen for. |
||
| 23 | * |
||
| 24 | * @return array |
||
| 25 | */ |
||
| 26 | public function register() |
||
| 27 | { |
||
| 28 | if (version_compare(PHP_CodeSniffer::VERSION, '2.3.4') >= 0) { |
||
| 29 | return array(T_OPEN_USE_GROUP); |
||
| 30 | } else { |
||
| 31 | return array(); |
||
| 32 | } |
||
| 33 | }//end register() |
||
| 34 | |||
| 35 | |||
| 36 | /** |
||
| 37 | * Processes this test, when one of its tokens is encountered. |
||
| 38 | * |
||
| 39 | * @param PHP_CodeSniffer_File $phpcsFile The file being scanned. |
||
| 40 | * @param int $stackPtr The position of the current token in |
||
| 41 | * the stack passed in $tokens. |
||
| 42 | * |
||
| 43 | * @return void |
||
| 44 | */ |
||
| 45 | public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) |
||
| 51 | }//end class |
||
| 52 |