Skip to content

Commit

Permalink
do not encode html entities in docblock descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
vazaha-nl committed Aug 8, 2023
1 parent 90d12be commit a853984
Show file tree
Hide file tree
Showing 19 changed files with 39 additions and 39 deletions.
6 changes: 3 additions & 3 deletions src/Models/AccountModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,17 @@ class AccountModel extends Model
public string $acct;

/**
* The location of the user's profile page.
* The location of the user's profile page.
*/
public string $url;

/**
* The profile's display name.
* The profile's display name.
*/
public string $display_name;

/**
* The profile's bio or description.
* The profile's bio or description.
*/
public string $note;

Expand Down
4 changes: 2 additions & 2 deletions src/Models/Admin/AccountModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,13 @@ class AccountModel extends Model
public ModelsAccountModel $account;

/**
* The ID of the [Application]({{< relref "entities/application" >}}) that
* The ID of the [Application]({{< relref "entities/application" >}}) that
* created this account, if applicable.
*/
public ?string $created_by_application_id = null;

/**
* The ID of the [Account]({{&lt; relref &quot;entities/account&quot; &gt;}}) that invited
* The ID of the [Account]({{< relref "entities/account" >}}) that invited
* this user, if applicable.
*/
public ?string $invited_by_account_id = null;
Expand Down
2 changes: 1 addition & 1 deletion src/Models/Admin/MeasureModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class MeasureModel extends Model
public string $key;

/**
* The units associated with this data item&#039;s value, if applicable.
* The units associated with this data item's value, if applicable.
*/
public ?string $unit = null;

Expand Down
2 changes: 1 addition & 1 deletion src/Models/Announcement/AccountModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class AccountModel extends Model
public string $username;

/**
* The location of the mentioned user&#039;s profile.
* The location of the mentioned user's profile.
*/
public string $url;

Expand Down
8 changes: 4 additions & 4 deletions src/Models/ApplicationModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ class ApplicationModel extends Model
public ?string $website = null;

/**
* Used for Push Streaming API. Returned with [POST /api/v1/apps]({{&lt; relref
* &quot;methods/apps#create&quot; &gt;}}). Equivalent to
* [WebPushSubscription#server_key]({{&lt; relref
* &quot;entities/WebPushSubscription#server_key&quot; &gt;}}).
* Used for Push Streaming API. Returned with [POST /api/v1/apps]({{< relref
* "methods/apps#create" >}}). Equivalent to
* [WebPushSubscription#server_key]({{< relref
* "entities/WebPushSubscription#server_key" >}}).
*/
public string $vapid_key;

Expand Down
6 changes: 3 additions & 3 deletions src/Models/CredentialAccountModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ class CredentialAccountModel extends AccountModel
{
/**
* An extra attribute that contains source values to be used with API methods
* that [verify credentials]({{&lt; relref &quot;methods/accounts#verify_credentials&quot;
* &gt;}}) and [update credentials]({{&lt; relref
* &quot;methods/accounts#update_credentials&quot; &gt;}}).
* that [verify credentials]({{< relref "methods/accounts#verify_credentials"
* >}}) and [update credentials]({{< relref
* "methods/accounts#update_credentials" >}}).
*
* @var mixed[]
*/
Expand Down
4 changes: 2 additions & 2 deletions src/Models/FieldModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
class FieldModel extends Model
{
/**
* The key of a given field&#039;s key-value pair.
* The key of a given field's key-value pair.
*/
public string $name;

Expand All @@ -28,7 +28,7 @@ class FieldModel extends Model
public string $value;

/**
* Timestamp of when the server verified a URL value for a rel=&quot;me&quot; link.
* Timestamp of when the server verified a URL value for a rel="me" link.
*/
public ?DateTimeInterface $verified_at = null;
}
2 changes: 1 addition & 1 deletion src/Models/FilterKeywordModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class FilterKeywordModel extends Model

/**
* Should the filter consider word boundaries? See [implementation guidelines
* for filters]({{&lt; relref &quot;api/guidelines#filters&quot; &gt;}}).
* for filters]({{< relref "api/guidelines#filters" >}}).
*/
public bool $whole_word;
}
4 changes: 2 additions & 2 deletions src/Models/IdentityProofModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class IdentityProofModel extends Model
public string $provider;

/**
* The account owner&#039;s username on the identity provider&#039;s service.
* The account owner's username on the identity provider's service.
*/
public string $provider_username;

Expand All @@ -38,7 +38,7 @@ class IdentityProofModel extends Model
public string $proof_url;

/**
* The account owner&#039;s profile URL on the identity provider.
* The account owner's profile URL on the identity provider.
*/
public string $profile_url;
}
12 changes: 6 additions & 6 deletions src/Models/PreferencesModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,22 @@ class PreferencesModel extends Model
{
/**
* Default visibility for new posts. Equivalent to
* [CredentialAccount#source\[privacy\]]({{&lt; relref
* &quot;entities/Account#source-privacy&quot; &gt;}}).
* [CredentialAccount#source\[privacy\]]({{< relref
* "entities/Account#source-privacy" >}}).
*/
public string $posting_default_visibility;

/**
* Default sensitivity flag for new posts. Equivalent to
* [CredentialAccount#source\[sensitive\]]({{&lt; relref
* &quot;entities/Account#source-sensitive&quot; &gt;}}).
* [CredentialAccount#source\[sensitive\]]({{< relref
* "entities/Account#source-sensitive" >}}).
*/
public bool $posting_default_sensitive;

/**
* Default language for new posts. Equivalent to
* [CredentialAccount#source\[language\]]({{&lt; relref
* &quot;entities/Account#source-language&quot; &gt;}}).
* [CredentialAccount#source\[language\]]({{< relref
* "entities/Account#source-language" >}}).
*/
public ?string $posting_default_language = null;

Expand Down
2 changes: 1 addition & 1 deletion src/Models/ReactionModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class ReactionModel extends Model
{
/**
* The emoji used for the reaction. Either a unicode emoji, or a custom
* emoji&#039;s shortcode.
* emoji's shortcode.
*/
public string $name;

Expand Down
6 changes: 3 additions & 3 deletions src/Models/RelationshipModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class RelationshipModel extends Model
public bool $following;

/**
* Are you receiving this user&#039;s boosts in your home timeline?
* Are you receiving this user's boosts in your home timeline?
*/
public bool $showing_reblogs;

Expand Down Expand Up @@ -73,7 +73,7 @@ class RelationshipModel extends Model
public bool $requested;

/**
* Are you blocking this user&#039;s domain?
* Are you blocking this user's domain?
*/
public bool $domain_blocking;

Expand All @@ -83,7 +83,7 @@ class RelationshipModel extends Model
public bool $endorsed;

/**
* This user&#039;s profile bio.
* This user's profile bio.
*/
public string $note;
}
2 changes: 1 addition & 1 deletion src/Models/Status/MentionModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class MentionModel extends Model
public string $username;

/**
* The location of the mentioned user&#039;s profile.
* The location of the mentioned user's profile.
*/
public string $url;

Expand Down
4 changes: 2 additions & 2 deletions src/Models/StatusModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class StatusModel extends Model
public int $replies_count;

/**
* A link to the status&#039;s HTML representation.
* A link to the status's HTML representation.
*/
public ?string $url = null;

Expand Down Expand Up @@ -165,7 +165,7 @@ class StatusModel extends Model

/**
* If the current token has an authorized user: Have you muted notifications
* for this status&#039;s conversation?
* for this status's conversation?
*/
public ?bool $muted = null;

Expand Down
2 changes: 1 addition & 1 deletion src/Models/StatusSourceModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class StatusSourceModel extends Model
public string $text;

/**
* The plain text used to compose the status&#039;s subject or content warning.
* The plain text used to compose the status's subject or content warning.
*/
public string $spoiler_text;
}
2 changes: 1 addition & 1 deletion src/Models/TagModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class TagModel extends Model
public array $history;

/**
* Whether the current token&#039;s authorized user is following this tag.
* Whether the current token's authorized user is following this tag.
*/
public ?bool $following = null;
}
6 changes: 3 additions & 3 deletions src/Models/V1/FilterModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ class FilterModel extends Model

/**
* Should matching entities in home and notifications be dropped by the
* server? See [implementation guidelines for filters]({{&lt; relref
* &quot;api/guidelines#filters&quot; &gt;}}).
* server? See [implementation guidelines for filters]({{< relref
* "api/guidelines#filters" >}}).
*/
public bool $irreversible;

/**
* Should the filter consider word boundaries? See [implementation guidelines
* for filters]({{&lt; relref &quot;api/guidelines#filters&quot; &gt;}}).
* for filters]({{< relref "api/guidelines#filters" >}}).
*/
public bool $whole_word;
}
2 changes: 1 addition & 1 deletion src/Models/WebPushSubscriptionModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class WebPushSubscriptionModel extends Model
public string $endpoint;

/**
* The streaming server&#039;s VAPID key.
* The streaming server's VAPID key.
*/
public string $server_key;

Expand Down
2 changes: 1 addition & 1 deletion tools/templates/Model.twig
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class {{ classname }} extends {% if parentClass %}{{ parentClass }}{% else %}Mod
{% if property.descriptionLines %}
/**
{% for descriptionLine in property.descriptionLines %}
* {{ descriptionLine }}
* {{ descriptionLine | raw }}
{% endfor %}
{% if property.typeHint %}
* @var {{ property.typeHint | raw }} ${{ property.name }}
Expand Down

0 comments on commit a853984

Please sign in to comment.