From cff060c212a57aea7b07997d60f543aeefd7d586 Mon Sep 17 00:00:00 2001 From: Jeremy Dormitzer Date: Sat, 15 Sep 2018 17:46:53 -0400 Subject: [PATCH] Code style changes --- inc/outbox.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/inc/outbox.php b/inc/outbox.php index 3e3fa53..cba1f92 100644 --- a/inc/outbox.php +++ b/inc/outbox.php @@ -23,7 +23,7 @@ require_once plugin_dir_path( __FILE__ ) . '/activities/block.php'; function handle_activity( $actor, $activity ) { // TODO handle authentication/authorization - if ( !array_key_exists( "type", $activity ) ) { + if ( !array_key_exists( 'type', $activity ) ) { return new \WP_Error( 'invalid_activity', __( 'Invalid activity', 'activitypub' ), @@ -80,10 +80,9 @@ function handle_activity( $actor, $activity ) { } if ( is_wp_error( $activity ) ) { return $activity; - } else { - $activity = deliver_activity( $activity ); - return persist_activity( $actor, $activity ); } + $activity = deliver_activity( $activity ); + return persist_activity( $actor, $activity ); } function get_outbox( $actor_id ) {