diff options
| author | Marc Alexander <admin@m-a-styles.de> | 2015-12-23 19:27:19 +0100 |
|---|---|---|
| committer | Marc Alexander <admin@m-a-styles.de> | 2015-12-23 19:27:19 +0100 |
| commit | b1e4a3e1b7efb3d131dd02fca76009e971585dac (patch) | |
| tree | c56894735743b3d43c751d59ab6b47e4d7ac211e /build/code_sniffer/phpbb/Sniffs/Namespaces | |
| parent | 6a4e296c436aa52477e7ebacdebc152fc3bcb2b1 (diff) | |
| parent | d256d81a51b9d6153e7c2e6499a7b559c14997f0 (diff) | |
| download | forums-b1e4a3e1b7efb3d131dd02fca76009e971585dac.tar forums-b1e4a3e1b7efb3d131dd02fca76009e971585dac.tar.gz forums-b1e4a3e1b7efb3d131dd02fca76009e971585dac.tar.bz2 forums-b1e4a3e1b7efb3d131dd02fca76009e971585dac.tar.xz forums-b1e4a3e1b7efb3d131dd02fca76009e971585dac.zip | |
Merge pull request #4094 from Nicofuma/ticket/14377
[ticket/14377] Allow extensions to register compiler pass
Diffstat (limited to 'build/code_sniffer/phpbb/Sniffs/Namespaces')
| -rw-r--r-- | build/code_sniffer/phpbb/Sniffs/Namespaces/UnusedUseSniff.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/build/code_sniffer/phpbb/Sniffs/Namespaces/UnusedUseSniff.php b/build/code_sniffer/phpbb/Sniffs/Namespaces/UnusedUseSniff.php index 7ffd1aadd6..c04113b84e 100644 --- a/build/code_sniffer/phpbb/Sniffs/Namespaces/UnusedUseSniff.php +++ b/build/code_sniffer/phpbb/Sniffs/Namespaces/UnusedUseSniff.php @@ -87,6 +87,11 @@ class phpbb_Sniffs_Namespaces_UnusedUseSniff implements PHP_CodeSniffer_Sniff $old_simple_statement = $simple_statement; $simple_class_name_start = $phpcsFile->findNext(array(T_NS_SEPARATOR, T_STRING), ($simple_statement + 1)); + + if ($simple_class_name_start === false) { + continue; + } + $simple_class_name_end = $phpcsFile->findNext($find, ($simple_statement + 1), null, true); $simple_class_name = trim($phpcsFile->getTokensAsString($simple_class_name_start, ($simple_class_name_end - $simple_class_name_start))); |
