mirror of
https://github.com/Automattic/wordpress-activitypub
synced 2024-10-18 14:23:31 +00:00
PHPCS: Enable MissingShort Sniff (#910)
This commit is contained in:
parent
2b5f635ba3
commit
7a19d7377f
7 changed files with 46 additions and 6 deletions
|
@ -22,6 +22,8 @@ class Activity extends Base_Object {
|
|||
);
|
||||
|
||||
/**
|
||||
* The type of the object.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $type = 'Activity';
|
||||
|
|
|
@ -48,6 +48,8 @@ class Actor extends Base_Object {
|
|||
);
|
||||
|
||||
/**
|
||||
* The type of the object.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $type;
|
||||
|
|
|
@ -45,6 +45,8 @@ class Base_Object {
|
|||
protected $id;
|
||||
|
||||
/**
|
||||
* The type of the object.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $type = 'Object';
|
||||
|
|
|
@ -118,6 +118,8 @@ class Event extends Base_Object {
|
|||
|
||||
/**
|
||||
* The Title of the event.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $name;
|
||||
|
||||
|
@ -145,12 +147,16 @@ class Event extends Base_Object {
|
|||
protected $comments_enabled;
|
||||
|
||||
/**
|
||||
* Timezone of the event.
|
||||
*
|
||||
* @context https://joinmobilizon.org/ns#timezone
|
||||
* @var string
|
||||
*/
|
||||
protected $timezone;
|
||||
|
||||
/**
|
||||
* Moderation option for replies.
|
||||
*
|
||||
* @context https://joinmobilizon.org/ns#repliesModerationOption
|
||||
* @see https://docs.joinmobilizon.org/contribute/activity_pub/#repliesmoderation
|
||||
* @var string
|
||||
|
@ -158,6 +164,8 @@ class Event extends Base_Object {
|
|||
protected $replies_moderation_option;
|
||||
|
||||
/**
|
||||
* Whether anonymous participation is enabled.
|
||||
*
|
||||
* @context https://joinmobilizon.org/ns#anonymousParticipationEnabled
|
||||
* @see https://docs.joinmobilizon.org/contribute/activity_pub/#anonymousparticipationenabled
|
||||
* @var bool
|
||||
|
@ -165,24 +173,32 @@ class Event extends Base_Object {
|
|||
protected $anonymous_participation_enabled;
|
||||
|
||||
/**
|
||||
* The event's category.
|
||||
*
|
||||
* @context https://schema.org/category
|
||||
* @var enum
|
||||
* @var string
|
||||
*/
|
||||
protected $category;
|
||||
|
||||
/**
|
||||
* Language of the event.
|
||||
*
|
||||
* @context https://schema.org/inLanguage
|
||||
* @var
|
||||
* @var string
|
||||
*/
|
||||
protected $in_language;
|
||||
|
||||
/**
|
||||
* Whether the event is online.
|
||||
*
|
||||
* @context https://joinmobilizon.org/ns#isOnline
|
||||
* @var bool
|
||||
*/
|
||||
protected $is_online;
|
||||
|
||||
/**
|
||||
* The event's status.
|
||||
*
|
||||
* @context https://www.w3.org/2002/12/cal/ical#status
|
||||
* @var enum
|
||||
*/
|
||||
|
@ -199,25 +215,33 @@ class Event extends Base_Object {
|
|||
protected $actor;
|
||||
|
||||
/**
|
||||
* The external participation URL.
|
||||
*
|
||||
* @context https://joinmobilizon.org/ns#externalParticipationUrl
|
||||
* @var string
|
||||
*/
|
||||
protected $external_participation_url;
|
||||
|
||||
/**
|
||||
* Indicator of how new members may be able to join.
|
||||
*
|
||||
* @context https://joinmobilizon.org/ns#joinMode
|
||||
* @see https://docs.joinmobilizon.org/contribute/activity_pub/#joinmode
|
||||
* @var
|
||||
* @var string
|
||||
*/
|
||||
protected $join_mode;
|
||||
|
||||
/**
|
||||
* The participant count of the event.
|
||||
*
|
||||
* @context https://joinmobilizon.org/ns#participantCount
|
||||
* @var int
|
||||
*/
|
||||
protected $participant_count;
|
||||
|
||||
/**
|
||||
* How many places there can be for an event.
|
||||
*
|
||||
* @context https://schema.org/maximumAttendeeCapacity
|
||||
* @see https://docs.joinmobilizon.org/contribute/activity_pub/#maximumattendeecapacity
|
||||
* @var int
|
||||
|
@ -225,6 +249,8 @@ class Event extends Base_Object {
|
|||
protected $maximum_attendee_capacity;
|
||||
|
||||
/**
|
||||
* The number of attendee places for an event that remain unallocated.
|
||||
*
|
||||
* @context https://schema.org/remainingAttendeeCapacity
|
||||
* @see https://docs.joinmobilizon.org/contribute/activity_pub/#remainignattendeecapacity
|
||||
* @var int
|
||||
|
|
|
@ -63,19 +63,26 @@ class Place extends Base_Object {
|
|||
protected $longitude;
|
||||
|
||||
/**
|
||||
* The radius from the given latitude and longitude for a Place.
|
||||
*
|
||||
* @see https://www.w3.org/TR/activitystreams-vocabulary/#dfn-radius
|
||||
* @var float
|
||||
*/
|
||||
protected $radius;
|
||||
|
||||
/**
|
||||
* Specifies the measurement units for the `radius` and `altitude` properties.
|
||||
*
|
||||
* @see https://www.w3.org/TR/activitystreams-vocabulary/#dfn-units
|
||||
* @var string
|
||||
*/
|
||||
protected $units;
|
||||
|
||||
/**
|
||||
* @var Postal_Address|string
|
||||
* The address of the place.
|
||||
*
|
||||
* @see https://schema.org/PostalAddress
|
||||
* @var array|string
|
||||
*/
|
||||
protected $address;
|
||||
|
||||
|
|
|
@ -12,7 +12,9 @@ use Activitypub\Transformer\Attachment;
|
|||
*/
|
||||
class Factory {
|
||||
/**
|
||||
* @param mixed $object The object to transform
|
||||
* Get the transformer for a given object.
|
||||
*
|
||||
* @param mixed $object The object to transform.
|
||||
* @return \Activitypub\Transformer|\WP_Error The transformer to use, or an error.
|
||||
*/
|
||||
public static function get_transformer( $object ) { // phpcs:ignore Universal.NamingConventions.NoReservedKeywordParameterNames.objectFound
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
<config name="text_domain" value="activitypub,default"/>
|
||||
|
||||
<rule ref="WordPress">
|
||||
<exclude name="Generic.Commenting.DocComment.MissingShort"/>
|
||||
<exclude name="Generic.CodeAnalysis.UnusedFunctionParameter"/>
|
||||
<exclude name="Generic.Commenting.DocComment.LongNotCapital"/>
|
||||
<exclude name="Squiz.Commenting"/>
|
||||
|
|
Loading…
Reference in a new issue