We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3d598e3 commit bf4cc7cCopy full SHA for bf4cc7c
CodeSniffer/Tokenizers/PHP.php
@@ -779,6 +779,15 @@ public function tokenizeString($string, $eolChar='\n')
779
}
780
781
782
+ // This is a special case when checking PHP 5.5+ code in PHP < 5.5
783
+ // where "finally" should be T_FINALLY instead of T_STRING.
784
+ if ($newToken['code'] === T_STRING
785
+ && strtolower($newToken['content']) === 'finally'
786
+ ) {
787
+ $newToken['code'] = T_FINALLY;
788
+ $newToken['type'] = 'T_FINALLY';
789
+ }
790
+
791
// This is a special case for the PHP 5.5 classname::class syntax
792
// where "class" should be T_STRING instead of T_CLASS.
793
if ($newToken['code'] === T_CLASS
0 commit comments