Unverified Commit 6db342aa authored by Klaus Purer's avatar Klaus Purer Committed by GitHub
Browse files

refactor(VariableComment): Remove dead code detected by PHPStan

parent 719ddb16
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -21,6 +21,8 @@ jobs:
        with:
          php-version: ${{ matrix.php-versions }}
          extensions: mbstring
          # Disable Xdebug for better performance.
          coverage: none
      - name: Get composer cache directory
        id: composercache
        run: echo "::set-output name=dir::$(composer config cache-files-dir)"
+0 −8
Original line number Diff line number Diff line
@@ -75,14 +75,6 @@ class VariableCommentSniff extends AbstractVariableSniff
            }

            return;
        } else if ($tokens[$commentEnd]['code'] !== T_DOC_COMMENT_CLOSE_TAG) {
            return;
        } else {
            // Make sure the comment we have found belongs to us.
            $commentFor = $phpcsFile->findNext([T_VARIABLE, T_CLASS, T_INTERFACE], ($commentEnd + 1));
            if ($commentFor !== $stackPtr) {
                return;
            }
        }//end if

        $commentStart = $tokens[$commentEnd]['comment_opener'];
+3 −3
Original line number Diff line number Diff line
@@ -12,13 +12,13 @@
        "standards",
        "code review"
    ],
    "license": "GPL-2.0+",
    "license": "GPL-2.0-or-later",
    "require": {
        "php": ">=7.0.8",
        "ext-mbstring": "*",
        "squizlabs/php_codesniffer": "^3.5.5",
        "squizlabs/php_codesniffer": "^3.5.6",
        "symfony/yaml": ">=2.0.5",
        "sirbrillig/phpcs-variable-analysis": "^2.8"
        "sirbrillig/phpcs-variable-analysis": "^2.10"
    },
    "autoload": {
        "psr-4": {
+1 −1
Original line number Diff line number Diff line
@@ -28,6 +28,6 @@
    },
    "require-dev": {
        "phpunit/phpunit": "^6.0 || ^7.0",
        "phpstan/phpstan": "^0.12.51"
        "phpstan/phpstan": "^0.12.63"
    }
}