From 08c6685a2e85e532c093e9c4fb46846000edf6f2 Mon Sep 17 00:00:00 2001 From: Mike Little Date: Fri, 22 May 2026 16:46:26 +0100 Subject: [PATCH] Add `: void` return type to test setUp() methods Required by PHPUnit 8+ and PHPUnit polyfills' LSP check. Nightly currently fails on this module with a setUp() signature mismatch. PHP 7.1+ compatible. Co-Authored-By: Claude Opus 4.7 (1M context) --- tests/class-test-content-security-policies.php | 2 +- tests/class-test-rest-allow-origins.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/class-test-content-security-policies.php b/tests/class-test-content-security-policies.php index dc28242..8120d94 100644 --- a/tests/class-test-content-security-policies.php +++ b/tests/class-test-content-security-policies.php @@ -5,7 +5,7 @@ use WP_UnitTestCase; class Test_Content_Security_Policies extends WP_UnitTestCase { - function setUp() { + function setUp(): void { Output::reset(); parent::setUp(); } diff --git a/tests/class-test-rest-allow-origins.php b/tests/class-test-rest-allow-origins.php index 3f7e4e9..e06c437 100644 --- a/tests/class-test-rest-allow-origins.php +++ b/tests/class-test-rest-allow-origins.php @@ -7,7 +7,7 @@ class Test_Rest_Allow_Origins extends WP_UnitTestCase { - function setUp() { + function setUp(): void { parent::setUp(); }