From 9455319cbe93c1d60fbd8d6a599733a0177b1e3a Mon Sep 17 00:00:00 2001
From: jrfnl <jrfnl@users.noreply.github.com>
Date: Wed, 24 Apr 2024 23:16:54 +0200
Subject: [PATCH] Various minor doc fixes

---
 Universal/Sniffs/Arrays/DuplicateArrayKeySniff.php             | 3 ---
 .../Sniffs/CodeAnalysis/ConstructorDestructorReturnSniff.php   | 2 +-
 Universal/Sniffs/ControlStructures/DisallowLonelyIfSniff.php   | 2 +-
 Universal/Sniffs/PHP/OneStatementInShortEchoTagSniff.php       | 2 +-
 Universal/Tests/UseStatements/KeywordSpacingUnitTest.2.inc     | 2 --
 .../Tests/UseStatements/KeywordSpacingUnitTest.2.inc.fixed     | 2 --
 Universal/Tests/UseStatements/KeywordSpacingUnitTest.php       | 2 +-
 7 files changed, 4 insertions(+), 11 deletions(-)

diff --git a/Universal/Sniffs/Arrays/DuplicateArrayKeySniff.php b/Universal/Sniffs/Arrays/DuplicateArrayKeySniff.php
index 7097fad7..1fe6841a 100644
--- a/Universal/Sniffs/Arrays/DuplicateArrayKeySniff.php
+++ b/Universal/Sniffs/Arrays/DuplicateArrayKeySniff.php
@@ -80,9 +80,6 @@ final class DuplicateArrayKeySniff extends AbstractArrayDeclarationSniff
     /**
      * Process every part of the array declaration.
      *
-     * This contains the default logic for the sniff, but can be overloaded in a concrete child class
-     * if needed.
-     *
      * @since 1.0.0
      *
      * @param \PHP_CodeSniffer\Files\File $phpcsFile The PHP_CodeSniffer file where the
diff --git a/Universal/Sniffs/CodeAnalysis/ConstructorDestructorReturnSniff.php b/Universal/Sniffs/CodeAnalysis/ConstructorDestructorReturnSniff.php
index 6f78cb66..147d46e7 100644
--- a/Universal/Sniffs/CodeAnalysis/ConstructorDestructorReturnSniff.php
+++ b/Universal/Sniffs/CodeAnalysis/ConstructorDestructorReturnSniff.php
@@ -166,7 +166,7 @@ public function process(File $phpcsFile, $stackPtr)
         $current = $tokens[$stackPtr]['scope_opener'];
         $end     = $tokens[$stackPtr]['scope_closer'];
 
-        // Not searching for arrow functions as those have an implicit return, so no
+        // Not searching for arrow functions as those have an implicit return, so won't use the `return` keyword.
         $search            = Collections::functionDeclarationTokens();
         $search[\T_RETURN] = \T_RETURN;
 
diff --git a/Universal/Sniffs/ControlStructures/DisallowLonelyIfSniff.php b/Universal/Sniffs/ControlStructures/DisallowLonelyIfSniff.php
index 58c81ae1..f29a1fea 100644
--- a/Universal/Sniffs/ControlStructures/DisallowLonelyIfSniff.php
+++ b/Universal/Sniffs/ControlStructures/DisallowLonelyIfSniff.php
@@ -121,7 +121,7 @@ public function process(File $phpcsFile, $stackPtr)
                     if ($tokens[$nextAfter]['code'] === \T_SEMICOLON) {
                         $innerScopeCloser = $nextAfter;
                     } else {
-                        // Missing semi-colon. Report, but don't auto-fix.
+                        // Missing semicolon. Report, but don't auto-fix.
                         $autoFixable = false;
                     }
                 } else {
diff --git a/Universal/Sniffs/PHP/OneStatementInShortEchoTagSniff.php b/Universal/Sniffs/PHP/OneStatementInShortEchoTagSniff.php
index cbccb4c6..d68c38ee 100644
--- a/Universal/Sniffs/PHP/OneStatementInShortEchoTagSniff.php
+++ b/Universal/Sniffs/PHP/OneStatementInShortEchoTagSniff.php
@@ -75,7 +75,7 @@ public function process(File $phpcsFile, $stackPtr)
             return;
         }
 
-        // Semi-colon, so check for any code between it and the close tag.
+        // Semicolon, so check for any code between it and the close tag.
         $nextNonEmpty = $phpcsFile->findNext(Tokens::$emptyTokens, ($endOfStatement + 1), null, true);
         if ($nextNonEmpty === false
             || $tokens[$nextNonEmpty]['code'] === \T_CLOSE_TAG
diff --git a/Universal/Tests/UseStatements/KeywordSpacingUnitTest.2.inc b/Universal/Tests/UseStatements/KeywordSpacingUnitTest.2.inc
index 162e98b3..a12f3abb 100644
--- a/Universal/Tests/UseStatements/KeywordSpacingUnitTest.2.inc
+++ b/Universal/Tests/UseStatements/KeywordSpacingUnitTest.2.inc
@@ -5,7 +5,5 @@
  * For PHP < 8.0, it will correctly flag this as "no space" after the `use` keyword.
  * For PHP 8.0+, this will no longer be flagged as keywords are allowed in namespaced names,
  * so the `use` is tokenized as `T_STRING` instead of `T_USE` and won't be flagged.
- *
- * For this reason, there is no "fixed" file included as the test would not be able to pass on PHP 8.0+.
  */
 use\Util\MyOtherClass;
diff --git a/Universal/Tests/UseStatements/KeywordSpacingUnitTest.2.inc.fixed b/Universal/Tests/UseStatements/KeywordSpacingUnitTest.2.inc.fixed
index 5589d374..e15065e9 100644
--- a/Universal/Tests/UseStatements/KeywordSpacingUnitTest.2.inc.fixed
+++ b/Universal/Tests/UseStatements/KeywordSpacingUnitTest.2.inc.fixed
@@ -5,7 +5,5 @@
  * For PHP < 8.0, it will correctly flag this as "no space" after the `use` keyword.
  * For PHP 8.0+, this will no longer be flagged as keywords are allowed in namespaced names,
  * so the `use` is tokenized as `T_STRING` instead of `T_USE` and won't be flagged.
- *
- * For this reason, there is no "fixed" file included as the test would not be able to pass on PHP 8.0+.
  */
 use \Util\MyOtherClass;
diff --git a/Universal/Tests/UseStatements/KeywordSpacingUnitTest.php b/Universal/Tests/UseStatements/KeywordSpacingUnitTest.php
index a7f201dc..abcc98c8 100644
--- a/Universal/Tests/UseStatements/KeywordSpacingUnitTest.php
+++ b/Universal/Tests/UseStatements/KeywordSpacingUnitTest.php
@@ -84,7 +84,7 @@ public function getErrorList($testFile = '')
 
             case 'KeywordSpacingUnitTest.2.inc':
                 return [
-                    11 => 1,
+                    9 => 1,
                 ];
 
             default: