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 b0971c8 commit f016606Copy full SHA for f016606
src/Files/File.php
@@ -1305,9 +1305,11 @@ public function getDeclarationName($stackPtr)
1305
}
1306
1307
$stopPoint = $this->numTokens;
1308
- if ($tokenCode === T_FUNCTION && isset($this->tokens[$stackPtr]['parenthesis_opener']) === true) {
+ if (isset($this->tokens[$stackPtr]['parenthesis_opener']) === true) {
1309
+ // For functions, stop searching at the parenthesis opener.
1310
$stopPoint = $this->tokens[$stackPtr]['parenthesis_opener'];
1311
} else if (isset($this->tokens[$stackPtr]['scope_opener']) === true) {
1312
+ // For OO tokens, stop searching at the open curly.
1313
$stopPoint = $this->tokens[$stackPtr]['scope_opener'];
1314
1315
0 commit comments