Skip to content

Commit bbe55a5

Browse files
committed
DisallowSpaceIndent and DisallowTabIndent were not record line indent metrics in the same
1 parent 006db7d commit bbe55a5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Standards/Generic/Sniffs/WhiteSpace/DisallowTabIndentSniff.php

+5-1
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,12 @@ public function process(File $phpcsFile, $stackPtr)
8686
$tabFound = false;
8787
if ($tokens[$i]['column'] === 1) {
8888
if ($content[0] === "\t") {
89-
$phpcsFile->recordMetric($i, 'Line indent', 'tabs');
9089
$tabFound = true;
90+
if (strpos($content, ' ') !== false) {
91+
$phpcsFile->recordMetric($i, 'Line indent', 'mixed');
92+
} else {
93+
$phpcsFile->recordMetric($i, 'Line indent', 'tabs');
94+
}
9195
} else if ($content[0] === ' ') {
9296
if (strpos($content, "\t") !== false) {
9397
$phpcsFile->recordMetric($i, 'Line indent', 'mixed');

0 commit comments

Comments
 (0)