You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
getTokensAsString() method: Add option to respect original content
When a file uses tabs and a `tab-width` is set, the `content` will have spaces instead of tabs.
This could lead to situations where the output of `getTokensAsString()` when used to move content about would unintentionally replace tabs with spaces.
This small change allows for retrieving the original content by passing a third parameter.
I've chosen to add a parameter rather than change the default function behaviour to prevent breaks for existing sniffs relying on this behaviour, like the Squiz/ArrayDeclaration sniff: https://github.com/squizlabs/PHP_CodeSniffer/blob/2ca6cf56420616cb47a88249eb5e3520f0e31ac7/src/Standards/Squiz/Sniffs/Arrays/ArrayDeclarationSniff.php#L477-L480
0 commit comments