From d60022e6b83fb702127d7aed4f34fdaa284fd7d2 Mon Sep 17 00:00:00 2001 From: jrfnl Date: Wed, 5 Jun 2024 17:39:42 +0200 Subject: [PATCH] Documentation: various minor improvements ... collected along the way. --- src/Reporter.php | 2 +- .../Sniffs/WhiteSpace/LanguageConstructSpacingSniff.php | 2 +- src/Standards/Squiz/Tests/Scope/MemberVarScopeUnitTest.php | 1 + .../Tests/NamingConventions/ValidVariableNameUnitTest.php | 1 + tests/Core/Util/Common/StripColorsTest.php | 4 ++-- tests/Core/Util/Common/SuggestTypeTest.php | 4 ++-- 6 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/Reporter.php b/src/Reporter.php index deaa8e2849..824031a485 100644 --- a/src/Reporter.php +++ b/src/Reporter.php @@ -364,7 +364,7 @@ public function prepareFileReport(File $phpcsFile) ]; if ($report['errors'] === 0 && $report['warnings'] === 0) { - // Prefect score! + // Perfect score! return $report; } diff --git a/src/Standards/Generic/Sniffs/WhiteSpace/LanguageConstructSpacingSniff.php b/src/Standards/Generic/Sniffs/WhiteSpace/LanguageConstructSpacingSniff.php index 462027d3d2..d4e913c1ad 100644 --- a/src/Standards/Generic/Sniffs/WhiteSpace/LanguageConstructSpacingSniff.php +++ b/src/Standards/Generic/Sniffs/WhiteSpace/LanguageConstructSpacingSniff.php @@ -81,7 +81,7 @@ public function process(File $phpcsFile, $stackPtr) && strtolower($content) !== 'yield from' ) { if ($tokens[($stackPtr - 1)]['code'] === T_YIELD_FROM) { - // A multi-line statements that has already been processed. + // A multi-line statement that has already been processed. return; } diff --git a/src/Standards/Squiz/Tests/Scope/MemberVarScopeUnitTest.php b/src/Standards/Squiz/Tests/Scope/MemberVarScopeUnitTest.php index e17f9ae7b9..0841239267 100644 --- a/src/Standards/Squiz/Tests/Scope/MemberVarScopeUnitTest.php +++ b/src/Standards/Squiz/Tests/Scope/MemberVarScopeUnitTest.php @@ -54,6 +54,7 @@ public function getErrorList() */ public function getWarningList() { + // Warning from getMemberProperties() about parse error. return [71 => 1]; }//end getWarningList() diff --git a/src/Standards/Zend/Tests/NamingConventions/ValidVariableNameUnitTest.php b/src/Standards/Zend/Tests/NamingConventions/ValidVariableNameUnitTest.php index 94316dad18..c66a2a42c8 100644 --- a/src/Standards/Zend/Tests/NamingConventions/ValidVariableNameUnitTest.php +++ b/src/Standards/Zend/Tests/NamingConventions/ValidVariableNameUnitTest.php @@ -92,6 +92,7 @@ public function getWarningList() 79 => 1, 82 => 1, 94 => 1, + // Warning from getMemberProperties() about parse error. 107 => 1, ]; diff --git a/tests/Core/Util/Common/StripColorsTest.php b/tests/Core/Util/Common/StripColorsTest.php index 67068f66e3..ff253b8b8e 100644 --- a/tests/Core/Util/Common/StripColorsTest.php +++ b/tests/Core/Util/Common/StripColorsTest.php @@ -1,6 +1,6 @@ * @copyright 2024 Juliette Reinders Folmer. All rights reserved. @@ -13,7 +13,7 @@ use PHPUnit\Framework\TestCase; /** - * Tests for the \PHP_CodeSniffer\Util\Sniffs\Common::stripColors() method. + * Tests for the \PHP_CodeSniffer\Util\Common::stripColors() method. * * @covers \PHP_CodeSniffer\Util\Common::stripColors */ diff --git a/tests/Core/Util/Common/SuggestTypeTest.php b/tests/Core/Util/Common/SuggestTypeTest.php index aa6fac9764..48bb6df1dc 100644 --- a/tests/Core/Util/Common/SuggestTypeTest.php +++ b/tests/Core/Util/Common/SuggestTypeTest.php @@ -1,6 +1,6 @@ * @copyright 2019 Juliette Reinders Folmer. All rights reserved. @@ -13,7 +13,7 @@ use PHPUnit\Framework\TestCase; /** - * Tests for the \PHP_CodeSniffer\Util\Sniffs\Common::suggestType() method. + * Tests for the \PHP_CodeSniffer\Util\Common::suggestType() method. * * @covers \PHP_CodeSniffer\Util\Common::suggestType */