Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generic/ConstructorName: minor efficiency tweak
As things were, the `$startIndex` would be the `function` keyword in the function declaration, which means that the complete declaration (parameters, defaults etc) would be walked, while we only really want to look _inside_ the function body. Fixed by starting the `while` loop on the `scope_opener` instead. Additionally, while the `$startIndex` would be moved forward on each loop, it would still examine one token too much (`scope_opener` cannot be a `T_DOUBLE_COLON`, `T_STRING` after `T_DOUBLE_COLON` cannot be a `T_DOUBLE_COLON`). Also fixed now.
- Loading branch information