Skip to content
Snippets Groups Projects
Unverified Commit 03b2b9e2 authored by Klaus Purer's avatar Klaus Purer Committed by GitHub
Browse files

tests(phpstan): Fix autoloading of constants and useless if() clause

parent f7a44429
Branches
Tags
No related merge requests found
......@@ -189,11 +189,6 @@ class ScopeIndentSniff implements Sniff
$checkAnnotations = $phpcsFile->config->annotations;
for ($i = ($stackPtr + 1); $i < $phpcsFile->numTokens; $i++) {
if ($i === false) {
// Something has gone very wrong; maybe a parse error.
break;
}
if ($checkAnnotations === true
&& $tokens[$i]['code'] === T_PHPCS_SET
&& isset($tokens[$i]['sniffCode']) === true
......
......@@ -3,3 +3,5 @@
require 'vendor/autoload.php';
require 'CoderSniffUnitTest.php';
require 'vendor/squizlabs/php_codesniffer/autoload.php';
// PHPStan does not find the constants in this file, so load it manually.
require_once 'vendor/squizlabs/php_codesniffer/src/Util/Tokens.php';
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment