From d4330c5f9c15847b5fce8308cedf14e310f85c83 Mon Sep 17 00:00:00 2001 From: jrfnl Date: Wed, 1 Nov 2023 13:00:03 +0100 Subject: [PATCH 1/3] Commenting/FileComment: add notes about parse errors to a few test files --- Yoast/Tests/Commenting/FileCommentUnitTest.14.inc | 3 +++ Yoast/Tests/Commenting/FileCommentUnitTest.7.inc | 2 +- Yoast/Tests/Commenting/FileCommentUnitTest.8.inc | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Yoast/Tests/Commenting/FileCommentUnitTest.14.inc b/Yoast/Tests/Commenting/FileCommentUnitTest.14.inc index 2c68b4a1..f36845e5 100644 --- a/Yoast/Tests/Commenting/FileCommentUnitTest.14.inc +++ b/Yoast/Tests/Commenting/FileCommentUnitTest.14.inc @@ -2,6 +2,9 @@ /** * File Comment for a file WITH a namespace. This should be flagged as unnecessary. * + * Note: a namespace _within_ a scoped `declare` statement is a parse error, but that's not the concern of this sniff. + * Scoped strict_types declare statements are also not allowed. + * * @package Some\Package */ diff --git a/Yoast/Tests/Commenting/FileCommentUnitTest.7.inc b/Yoast/Tests/Commenting/FileCommentUnitTest.7.inc index 23a5bd25..77f049e4 100644 --- a/Yoast/Tests/Commenting/FileCommentUnitTest.7.inc +++ b/Yoast/Tests/Commenting/FileCommentUnitTest.7.inc @@ -1,6 +1,6 @@ Date: Sat, 14 Oct 2023 07:44:33 +0200 Subject: [PATCH 2/3] Commenting/FileComment: add extra tests ... for a few edge cases previously not covered by tests. --- Yoast/Tests/Commenting/FileCommentUnitTest.21.inc | 2 ++ Yoast/Tests/Commenting/FileCommentUnitTest.22.inc | 8 ++++++++ Yoast/Tests/Commenting/FileCommentUnitTest.php | 6 ++++++ 3 files changed, 16 insertions(+) create mode 100644 Yoast/Tests/Commenting/FileCommentUnitTest.21.inc create mode 100644 Yoast/Tests/Commenting/FileCommentUnitTest.22.inc diff --git a/Yoast/Tests/Commenting/FileCommentUnitTest.21.inc b/Yoast/Tests/Commenting/FileCommentUnitTest.21.inc new file mode 100644 index 00000000..f2d31979 --- /dev/null +++ b/Yoast/Tests/Commenting/FileCommentUnitTest.21.inc @@ -0,0 +1,2 @@ +