Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHPCS: Enable MissingShort Sniff #910

Merged
merged 1 commit into from
Sep 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions includes/activity/class-activity.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ class Activity extends Base_Object {
);

/**
* The type of the object.
*
* @var string
*/
protected $type = 'Activity';
Expand Down
2 changes: 2 additions & 0 deletions includes/activity/class-actor.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ class Actor extends Base_Object {
);

/**
* The type of the object.
*
* @var string
*/
protected $type;
Expand Down
2 changes: 2 additions & 0 deletions includes/activity/class-base-object.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ class Base_Object {
protected $id;

/**
* The type of the object.
*
* @var string
*/
protected $type = 'Object';
Expand Down
32 changes: 29 additions & 3 deletions includes/activity/extended-object/class-event.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ class Event extends Base_Object {

/**
* The Title of the event.
*
* @var string
*/
protected $name;

Expand Down Expand Up @@ -145,44 +147,58 @@ 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
*/
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
*/
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
*/
Expand All @@ -199,32 +215,42 @@ 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
*/
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
Expand Down
9 changes: 8 additions & 1 deletion includes/activity/extended-object/class-place.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
4 changes: 3 additions & 1 deletion includes/transformer/class-factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
*/
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
Expand Down
1 change: 0 additions & 1 deletion phpcs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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"/>
Expand Down
Loading