diff --git a/Sniffs/Commenting/SingleLineCommentSniff.php b/Sniffs/Commenting/SingleLineCommentSniff.php index c5f464b..3d92ce2 100644 --- a/Sniffs/Commenting/SingleLineCommentSniff.php +++ b/Sniffs/Commenting/SingleLineCommentSniff.php @@ -90,7 +90,8 @@ public function process( File $phpcs_file, $stack_position ) { */ if ( strpos( $check_content, 'phpcs:' ) !== false || - strpos( $check_content, '@codeCoverageIgnore' ) !== false + strpos( $check_content, '@codeCoverageIgnore' ) !== false || + strpos( $check_content, '@phpstan' ) !== false ) { return; diff --git a/Tests/Commenting/SingleLineCommentUnitTest.inc b/Tests/Commenting/SingleLineCommentUnitTest.inc index d4ad822..8c9caac 100644 --- a/Tests/Commenting/SingleLineCommentUnitTest.inc +++ b/Tests/Commenting/SingleLineCommentUnitTest.inc @@ -15,6 +15,10 @@ $a = 1; // trailing comment. +// @phpstan-ignore-next-line identifier -- reason + +// @phpstan-ignore identifier -- reason + /* * This spans * multiple lines. diff --git a/package.json b/package.json index f408644..084c689 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@bsu/BSUWordPressCS", - "version": "1.3.0", + "version": "1.3.1", "description": "Custom PHPCS sniffs for BSU WordPress standards", "author": "BSU|NTC Web Services", "license": "Copyright Web Services, Bemidji State University - All Rights Reserved. Unauthorized copying of any files or code in this package, via any medium is strictly prohibited.",