From fa08fd87b8cbcd4eeb6c4e76b61b5e2fa52d0125 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Menrath?= Date: Sat, 2 Nov 2024 11:18:18 +0100 Subject: [PATCH] fix return type mixed for php7.4 --- .../transformer/location/class-the-events-calendar.php | 2 +- tests/test-class-plugin-the-events-calendar.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/activitypub/transformer/location/class-the-events-calendar.php b/includes/activitypub/transformer/location/class-the-events-calendar.php index f40c286..2c5977a 100644 --- a/includes/activitypub/transformer/location/class-the-events-calendar.php +++ b/includes/activitypub/transformer/location/class-the-events-calendar.php @@ -47,7 +47,7 @@ final class The_Events_Calendar extends Post { * * @return array|string|null The place/venue if one is set. */ - public function get_address(): mixed { + public function get_address() { $address = array(); if ( ! empty( $this->wp_object->country ) ) { diff --git a/tests/test-class-plugin-the-events-calendar.php b/tests/test-class-plugin-the-events-calendar.php index ebb3639..a0479bd 100644 --- a/tests/test-class-plugin-the-events-calendar.php +++ b/tests/test-class-plugin-the-events-calendar.php @@ -192,6 +192,7 @@ class Test_The_Events_Calendar extends WP_UnitTestCase { ->create(); // Call the transformer. + $event_array = \Activitypub\Transformer\Factory::get_transformer( $wp_object )->to_object()->to_array(); // Check that the event ActivityStreams representation contains everything as expected.