fix return type of to_object of final event transformers
Some checks failed
Some checks failed
This commit is contained in:
parent
cadb01a488
commit
8391b1dbc2
3 changed files with 4 additions and 3 deletions
|
@ -264,7 +264,7 @@ final class Events_Manager extends Event_Transformer {
|
||||||
*
|
*
|
||||||
* @return Activitypub\Activity\Event
|
* @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' );
|
$this->em_event = new EM_Event( $this->wp_object->ID, 'post_id' );
|
||||||
$activitypub_object = new Event();
|
$activitypub_object = new Event();
|
||||||
|
|
||||||
|
|
|
@ -199,7 +199,7 @@ final class GatherPress extends Event {
|
||||||
*
|
*
|
||||||
* @return Activitypub\Activity\Event
|
* @return Activitypub\Activity\Event
|
||||||
*/
|
*/
|
||||||
public function to_object() {
|
public function to_object(): Event_Object {
|
||||||
$activitypub_object = parent::to_object();
|
$activitypub_object = parent::to_object();
|
||||||
|
|
||||||
return $activitypub_object;
|
return $activitypub_object;
|
||||||
|
|
|
@ -14,6 +14,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
|
|
||||||
use Activitypub_Event_Extensions\Activitypub\Transformer\Event;
|
use Activitypub_Event_Extensions\Activitypub\Transformer\Event;
|
||||||
use Activitypub\Activity\Extended_Object\Place;
|
use Activitypub\Activity\Extended_Object\Place;
|
||||||
|
use Activitypub\Activity\Extended_Object\Event as Event_Object;
|
||||||
use WP_Error;
|
use WP_Error;
|
||||||
use WP_Post;
|
use WP_Post;
|
||||||
|
|
||||||
|
@ -194,7 +195,7 @@ final class The_Events_Calendar extends Event {
|
||||||
*
|
*
|
||||||
* @return Event_Object
|
* @return Event_Object
|
||||||
*/
|
*/
|
||||||
public function to_object() {
|
public function to_object(): Event_Object {
|
||||||
$activitypub_object = parent::to_object();
|
$activitypub_object = parent::to_object();
|
||||||
|
|
||||||
return $activitypub_object;
|
return $activitypub_object;
|
||||||
|
|
Loading…
Reference in a new issue