Skip to content

Commit 53656de

Browse files
committed
Merge branch 'feature/generic-subversion-minor-efficiency-fix' of https://github.com/jrfnl/PHP_CodeSniffer
2 parents ec7796d + 9839839 commit 53656de

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/Standards/Generic/Sniffs/VersionControl/SubversionPropertiesSniff.php

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,18 +56,11 @@ public function process(File $phpcsFile, $stackPtr)
5656
{
5757
$tokens = $phpcsFile->getTokens();
5858

59-
// Make sure this is the first PHP open tag so we don't process the
60-
// same file twice.
61-
$prevOpenTag = $phpcsFile->findPrevious(T_OPEN_TAG, ($stackPtr - 1));
62-
if ($prevOpenTag !== false) {
63-
return;
64-
}
65-
6659
$path = $phpcsFile->getFileName();
6760
$properties = $this->getProperties($path);
6861
if ($properties === null) {
6962
// Not under version control.
70-
return;
63+
return ($phpcsFile->numTokens + 1);
7164
}
7265

7366
$allProperties = ($properties + $this->properties);
@@ -109,6 +102,9 @@ public function process(File $phpcsFile, $stackPtr)
109102
}
110103
}//end foreach
111104

105+
// Ignore the rest of the file.
106+
return ($phpcsFile->numTokens + 1);
107+
112108
}//end process()
113109

114110

0 commit comments

Comments
 (0)