fix return type of to_object of final event transformers
Some checks failed
PHP Code Checker / PHP Code Checker (pull_request) Successful in 35s
PHPUnit / PHPUnit – PHP 8.1 (pull_request) Failing after 58s
PHPUnit / PHPUnit – PHP 8.2 (pull_request) Failing after 59s
PHPUnit / PHPUnit – PHP 8.3 (pull_request) Failing after 56s

This commit is contained in:
André Menrath 2024-09-25 11:03:05 +02:00
parent cadb01a488
commit 8391b1dbc2
3 changed files with 4 additions and 3 deletions

View file

@ -264,7 +264,7 @@ final class Events_Manager extends Event_Transformer {
*
* @return Activitypub\Activity\Event
*/
public function to_object() {
public function to_object(): Event {
$this->em_event = new EM_Event( $this->wp_object->ID, 'post_id' );
$activitypub_object = new Event();

View file

@ -199,7 +199,7 @@ final class GatherPress extends Event {
*
* @return Activitypub\Activity\Event
*/
public function to_object() {
public function to_object(): Event_Object {
$activitypub_object = parent::to_object();
return $activitypub_object;

View file

@ -14,6 +14,7 @@ if ( ! defined( 'ABSPATH' ) ) {
use Activitypub_Event_Extensions\Activitypub\Transformer\Event;
use Activitypub\Activity\Extended_Object\Place;
use Activitypub\Activity\Extended_Object\Event as Event_Object;
use WP_Error;
use WP_Post;
@ -194,7 +195,7 @@ final class The_Events_Calendar extends Event {
*
* @return Event_Object
*/
public function to_object() {
public function to_object(): Event_Object {
$activitypub_object = parent::to_object();
return $activitypub_object;