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
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -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
+2 −0
Original line number Diff line number Diff line
@@ -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';