Skip to content
Snippets Groups Projects
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
Branches
Tags
1 merge request!4Issue #3217297: False positive in closure usage of USE keyword.
......@@ -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)"
......
......@@ -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'];
......
......@@ -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": {
......
......@@ -28,6 +28,6 @@
},
"require-dev": {
"phpunit/phpunit": "^6.0 || ^7.0",
"phpstan/phpstan": "^0.12.51"
"phpstan/phpstan": "^0.12.63"
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment