From 38caa8d2b03e5ca076c25aa0b1135bcb168eed80 Mon Sep 17 00:00:00 2001 From: ruru4143 Date: Mon, 11 Dec 2023 19:47:24 +0100 Subject: [PATCH] whitespace fixes --- activitypub/object/class-event.php | 43 +++++++++++++++--------------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/activitypub/object/class-event.php b/activitypub/object/class-event.php index 1eef35f..bebf111 100644 --- a/activitypub/object/class-event.php +++ b/activitypub/object/class-event.php @@ -16,7 +16,8 @@ require_once __DIR__ . '/class-place.php'; * * @see https://www.w3.org/TR/activitystreams-vocabulary/#dfn-event */ -class Event extends \Activitypub\Activity\Base_Object { // todo maybe rename to mobilizon event? +class Event extends \Activitypub\Activity\Base_Object { + // todo maybe rename to mobilizon event? const REPLIES_MODERATION_OPTION_TYPES = [ 'allow_all', 'closed' ]; const JOIN_MODE_TYPES = [ 'free', 'restricted', 'external' ]; // amd 'invite', but not used by mobilizon atm @@ -111,32 +112,32 @@ class Event extends \Activitypub\Activity\Base_Object { // todo maybe rename to protected $maximum_attendee_capacity; - /** - * Get the context information for a property. - * - * @param string $property - * - * @return array|null - */ - private function get_property_context( string $property ) { - $reflection_class = new ReflectionClass( $this ); + /** + * Get the context information for a property. + * + * @param string $property + * + * @return array|null + */ + private function get_property_context( string $property ) { + $reflection_class = new ReflectionClass( $this ); - if ( $reflection_class->hasProperty( $property ) ) { - $reflection_property = $reflection_class->getProperty( $property ); - $doc_omment = $reflection_property->getDocComment(); + if ( $reflection_class->hasProperty( $property ) ) { + $reflection_property = $reflection_class->getProperty( $property ); + $doc_omment = $reflection_property->getDocComment(); - // Extract context information from the doc comment. - preg_match( '/@context\s+([^\s]+)/', $doc_omment, $matches ); + // Extract context information from the doc comment. + preg_match( '/@context\s+([^\s]+)/', $doc_omment, $matches ); - if ( !empty( $matches[1] ) ) { - return $matches[1]; - } else { + if ( ! empty( $matches[1] ) ) { + return $matches[1]; + } else { return 'https://www.w3.org/ns/activitystreams'; } - } + } - return null; - } + return null; + } private static function compact_context( $key_context, $namespace, $abbreviation ) { $abbreviation_added = false;