From bf62ed130ddde918adc07d637d0a6e441b7060aa Mon Sep 17 00:00:00 2001 From: jrfnl Date: Mon, 18 Sep 2023 05:18:39 +0200 Subject: [PATCH] Docs: improve test `@return` tags ... and use consistent spacing (blank line between param and return tags). --- .../Tests/Commenting/CodeCoverageIgnoreDeprecatedUnitTest.php | 4 ++-- Yoast/Tests/Commenting/CoversTagUnitTest.php | 4 ++-- Yoast/Tests/Commenting/FileCommentUnitTest.php | 4 ++-- Yoast/Tests/Commenting/TestsHaveCoversTagUnitTest.php | 4 ++-- Yoast/Tests/Files/FileNameUnitTest.php | 4 ++-- Yoast/Tests/Files/TestDoublesUnitTest.php | 4 ++-- Yoast/Tests/NamingConventions/NamespaceNameUnitTest.php | 4 ++-- Yoast/Tests/NamingConventions/ObjectNameDepthUnitTest.php | 4 ++-- Yoast/Tests/NamingConventions/ValidHookNameUnitTest.php | 4 ++-- Yoast/Tests/Tools/BrainMonkeyRaceConditionUnitTest.php | 4 ++-- Yoast/Tests/WhiteSpace/FunctionSpacingUnitTest.php | 4 ++-- Yoast/Tests/Yoast/AlternativeFunctionsUnitTest.php | 4 ++-- 12 files changed, 24 insertions(+), 24 deletions(-) diff --git a/Yoast/Tests/Commenting/CodeCoverageIgnoreDeprecatedUnitTest.php b/Yoast/Tests/Commenting/CodeCoverageIgnoreDeprecatedUnitTest.php index ac9532c9..13214ab4 100644 --- a/Yoast/Tests/Commenting/CodeCoverageIgnoreDeprecatedUnitTest.php +++ b/Yoast/Tests/Commenting/CodeCoverageIgnoreDeprecatedUnitTest.php @@ -16,7 +16,7 @@ final class CodeCoverageIgnoreDeprecatedUnitTest extends AbstractSniffUnitTest { /** * Returns the lines where errors should occur. * - * @return array => + * @return array Key is the line number, value is the number of expected errors. */ public function getErrorList(): array { return [ @@ -31,7 +31,7 @@ public function getErrorList(): array { /** * Returns the lines where warnings should occur. * - * @return array => + * @return array Key is the line number, value is the number of expected warnings. */ public function getWarningList(): array { return []; diff --git a/Yoast/Tests/Commenting/CoversTagUnitTest.php b/Yoast/Tests/Commenting/CoversTagUnitTest.php index b39756cf..dc13a899 100644 --- a/Yoast/Tests/Commenting/CoversTagUnitTest.php +++ b/Yoast/Tests/Commenting/CoversTagUnitTest.php @@ -16,7 +16,7 @@ final class CoversTagUnitTest extends AbstractSniffUnitTest { /** * Returns the lines where errors should occur. * - * @return array => + * @return array Key is the line number, value is the number of expected errors. */ public function getErrorList(): array { return [ @@ -52,7 +52,7 @@ public function getErrorList(): array { /** * Returns the lines where warnings should occur. * - * @return array => + * @return array Key is the line number, value is the number of expected warnings. */ public function getWarningList(): array { return []; diff --git a/Yoast/Tests/Commenting/FileCommentUnitTest.php b/Yoast/Tests/Commenting/FileCommentUnitTest.php index 9e5b6b27..8a0d6ab6 100644 --- a/Yoast/Tests/Commenting/FileCommentUnitTest.php +++ b/Yoast/Tests/Commenting/FileCommentUnitTest.php @@ -18,7 +18,7 @@ final class FileCommentUnitTest extends AbstractSniffUnitTest { * * @param string $testFile The name of the file being tested. * - * @return array => + * @return array Key is the line number, value is the number of expected errors. */ public function getErrorList( string $testFile = '' ): array { switch ( $testFile ) { @@ -40,7 +40,7 @@ public function getErrorList( string $testFile = '' ): array { * * @param string $testFile The name of the file being tested. * - * @return array => + * @return array Key is the line number, value is the number of expected warnings. */ public function getWarningList( string $testFile = '' ): array { switch ( $testFile ) { diff --git a/Yoast/Tests/Commenting/TestsHaveCoversTagUnitTest.php b/Yoast/Tests/Commenting/TestsHaveCoversTagUnitTest.php index 3ff0567e..0c728219 100644 --- a/Yoast/Tests/Commenting/TestsHaveCoversTagUnitTest.php +++ b/Yoast/Tests/Commenting/TestsHaveCoversTagUnitTest.php @@ -16,7 +16,7 @@ final class TestsHaveCoversTagUnitTest extends AbstractSniffUnitTest { /** * Returns the lines where errors should occur. * - * @return array => + * @return array Key is the line number, value is the number of expected errors. */ public function getErrorList(): array { return [ @@ -32,7 +32,7 @@ public function getErrorList(): array { /** * Returns the lines where warnings should occur. * - * @return array => + * @return array Key is the line number, value is the number of expected warnings. */ public function getWarningList(): array { return []; diff --git a/Yoast/Tests/Files/FileNameUnitTest.php b/Yoast/Tests/Files/FileNameUnitTest.php index 1b23b3c1..472c8a07 100644 --- a/Yoast/Tests/Files/FileNameUnitTest.php +++ b/Yoast/Tests/Files/FileNameUnitTest.php @@ -116,7 +116,7 @@ protected function getTestFiles( $testFileBase ): array { * * @param string $testFile The name of the file being tested. * - * @return array => + * @return array Key is the line number, value is the number of expected errors. */ public function getErrorList( string $testFile = '' ): array { @@ -134,7 +134,7 @@ public function getErrorList( string $testFile = '' ): array { * * @param string $testFile The name of the file being tested. * - * @return array => + * @return array Key is the line number, value is the number of expected warnings. */ public function getWarningList( string $testFile = '' ): array { if ( $testFile === 'no-basepath.inc' ) { diff --git a/Yoast/Tests/Files/TestDoublesUnitTest.php b/Yoast/Tests/Files/TestDoublesUnitTest.php index aa6db038..9d9aa151 100644 --- a/Yoast/Tests/Files/TestDoublesUnitTest.php +++ b/Yoast/Tests/Files/TestDoublesUnitTest.php @@ -53,7 +53,7 @@ protected function getTestFiles( $testFileBase ): array { * * @param string $testFile The name of the file being tested. * - * @return array => + * @return array Key is the line number, value is the number of expected errors. */ public function getErrorList( string $testFile = '' ): array { @@ -132,7 +132,7 @@ public function getErrorList( string $testFile = '' ): array { * * @param string $testFile The name of the file being tested. * - * @return array => + * @return array Key is the line number, value is the number of expected warnings. */ public function getWarningList( string $testFile = '' ): array { switch ( $testFile ) { diff --git a/Yoast/Tests/NamingConventions/NamespaceNameUnitTest.php b/Yoast/Tests/NamingConventions/NamespaceNameUnitTest.php index 6f22f57c..e2b3c904 100644 --- a/Yoast/Tests/NamingConventions/NamespaceNameUnitTest.php +++ b/Yoast/Tests/NamingConventions/NamespaceNameUnitTest.php @@ -62,7 +62,7 @@ protected function getTestFiles( $testFileBase ): array { * * @param string $testFile The name of the file being tested. * - * @return array => + * @return array Key is the line number, value is the number of expected errors. */ public function getErrorList( string $testFile = '' ): array { @@ -171,7 +171,7 @@ public function getErrorList( string $testFile = '' ): array { * * @param string $testFile The name of the file being tested. * - * @return array => + * @return array Key is the line number, value is the number of expected warnings. */ public function getWarningList( string $testFile = '' ): array { switch ( $testFile ) { diff --git a/Yoast/Tests/NamingConventions/ObjectNameDepthUnitTest.php b/Yoast/Tests/NamingConventions/ObjectNameDepthUnitTest.php index d131adc7..5cfd715f 100644 --- a/Yoast/Tests/NamingConventions/ObjectNameDepthUnitTest.php +++ b/Yoast/Tests/NamingConventions/ObjectNameDepthUnitTest.php @@ -18,7 +18,7 @@ final class ObjectNameDepthUnitTest extends AbstractSniffUnitTest { * * @param string $testFile The name of the file being tested. * - * @return array => + * @return array Key is the line number, value is the number of expected errors. */ public function getErrorList( string $testFile = '' ): array { @@ -54,7 +54,7 @@ public function getErrorList( string $testFile = '' ): array { * * @param string $testFile The name of the file being tested. * - * @return array => + * @return array Key is the line number, value is the number of expected warnings. */ public function getWarningList( string $testFile = '' ): array { switch ( $testFile ) { diff --git a/Yoast/Tests/NamingConventions/ValidHookNameUnitTest.php b/Yoast/Tests/NamingConventions/ValidHookNameUnitTest.php index 5bb0939a..8aa47639 100644 --- a/Yoast/Tests/NamingConventions/ValidHookNameUnitTest.php +++ b/Yoast/Tests/NamingConventions/ValidHookNameUnitTest.php @@ -30,7 +30,7 @@ public function setCliValues( $filename, $config ): void { /** * Returns the lines where errors should occur. * - * @return array => + * @return array Key is the line number, value is the number of expected errors. */ public function getErrorList(): array { @@ -56,7 +56,7 @@ public function getErrorList(): array { /** * Returns the lines where warnings should occur. * - * @return array => + * @return array Key is the line number, value is the number of expected warnings. */ public function getWarningList(): array { return [ diff --git a/Yoast/Tests/Tools/BrainMonkeyRaceConditionUnitTest.php b/Yoast/Tests/Tools/BrainMonkeyRaceConditionUnitTest.php index 026ce6fc..6b1d6339 100644 --- a/Yoast/Tests/Tools/BrainMonkeyRaceConditionUnitTest.php +++ b/Yoast/Tests/Tools/BrainMonkeyRaceConditionUnitTest.php @@ -16,7 +16,7 @@ final class BrainMonkeyRaceConditionUnitTest extends AbstractSniffUnitTest { /** * Returns the lines where errors should occur. * - * @return array => + * @return array Key is the line number, value is the number of expected errors. */ public function getErrorList(): array { return [ @@ -30,7 +30,7 @@ public function getErrorList(): array { /** * Returns the lines where warnings should occur. * - * @return array => + * @return array Key is the line number, value is the number of expected warnings. */ public function getWarningList(): array { return []; diff --git a/Yoast/Tests/WhiteSpace/FunctionSpacingUnitTest.php b/Yoast/Tests/WhiteSpace/FunctionSpacingUnitTest.php index 4248aa0a..7a6f7d79 100644 --- a/Yoast/Tests/WhiteSpace/FunctionSpacingUnitTest.php +++ b/Yoast/Tests/WhiteSpace/FunctionSpacingUnitTest.php @@ -16,7 +16,7 @@ final class FunctionSpacingUnitTest extends AbstractSniffUnitTest { /** * Returns the lines where errors should occur. * - * @return array => + * @return array Key is the line number, value is the number of expected errors. */ public function getErrorList(): array { return [ @@ -36,7 +36,7 @@ public function getErrorList(): array { /** * Returns the lines where warnings should occur. * - * @return array => + * @return array Key is the line number, value is the number of expected warnings. */ public function getWarningList(): array { return []; diff --git a/Yoast/Tests/Yoast/AlternativeFunctionsUnitTest.php b/Yoast/Tests/Yoast/AlternativeFunctionsUnitTest.php index 9cb6487e..432e9de3 100644 --- a/Yoast/Tests/Yoast/AlternativeFunctionsUnitTest.php +++ b/Yoast/Tests/Yoast/AlternativeFunctionsUnitTest.php @@ -16,7 +16,7 @@ final class AlternativeFunctionsUnitTest extends AbstractSniffUnitTest { /** * Returns the lines where errors should occur. * - * @return array => + * @return array Key is the line number, value is the number of expected errors. */ public function getErrorList(): array { return [ @@ -33,7 +33,7 @@ public function getErrorList(): array { /** * Returns the lines where warnings should occur. * - * @return array => + * @return array Key is the line number, value is the number of expected warnings. */ public function getWarningList(): array { return [];