Open
Description
Sort of a mix between the File::getNext()
/File::getPrevious()
methods and the File::getStartOfStatement()
/File::getEndOfStatement()
methods.
Method should take the following parameters: File $phpcsFile, int $stackPtr, ?int $end, array|string|int $types
The method should skip over:
- Sets of parentheses
- Sets of square brackets, including short array/list brackets
- Sets of curly/scope brackets
- Sets of attributes brackets
- Docblocks
$types
should be checked to not include the tokens being skipped over.
Typical use cases:
- Breaking up a function call to its individual parameters
- Breaking up a match expression
- Breaking up an array/list to its individual parts
- etc