Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generic/OpeningFunctionBraceKernighanRitchie: simplify logic to find …
…end of the function declaration When finding the end of the function declaration, the sniff had an unnecessary block of code to change the `$end` parameter passed to `findPrevious()` when handling a closure with a `use` statement. Since we are looking for the first non-empty token before the opening curly brace, it is not necessary to change the value of the `$end` parameter. Actually, we don't even need to limit the search and we can pass `null` (the default value). The returned first non-empty token will be the same anyway regardless if `$end` is the closing parenthesis before `use`, after `use` or `null`.
- Loading branch information