Skip to content

Commit

Permalink
lint noms
Browse files Browse the repository at this point in the history
  • Loading branch information
mattwiebe committed Jun 27, 2024
1 parent 752b108 commit e682a19
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
1 change: 1 addition & 0 deletions enable-mastodon-apps.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
*/

namespace Enable_Mastodon_Apps;

use OAuth2;

defined( 'ABSPATH' ) || exit;
Expand Down
10 changes: 5 additions & 5 deletions includes/class-mastodon-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -2775,12 +2775,12 @@ public static function remap_comment_id( $comment_id ) {

public static function remap_user_id( $user_id ) {
$user_id = apply_filters( 'mastodon_api_canonical_user_id', $user_id );
$term = get_term_by( 'name', $user_id, \Enable_Mastodon_Apps\Mastodon_API::REMAP_TAXONOMY );
$term = get_term_by( 'name', $user_id, self::REMAP_TAXONOMY );
$remote_user_id = 0;
if ( $term ) {
$remote_user_id = $term->term_id;
} else {
$term = wp_insert_term( $user_id, \Enable_Mastodon_Apps\Mastodon_API::REMAP_TAXONOMY );
$term = wp_insert_term( $user_id, self::REMAP_TAXONOMY );
if ( is_wp_error( $term ) ) {
return $remote_user_id;
}
Expand All @@ -2791,12 +2791,12 @@ public static function remap_user_id( $user_id ) {
}

public static function remap_url( $url ) {
$term = get_term_by( 'name', $url, \Enable_Mastodon_Apps\Mastodon_API::REMAP_TAXONOMY );
$term = get_term_by( 'name', $url, self::REMAP_TAXONOMY );
$remapped_id = 0;
if ( $term ) {
$remapped_id = $term->term_id;
} else {
$term = wp_insert_term( $url, \Enable_Mastodon_Apps\Mastodon_API::REMAP_TAXONOMY );
$term = wp_insert_term( $url, self::REMAP_TAXONOMY );
if ( ! is_wp_error( $term ) ) {
$remapped_id = $term['term_id'];
}
Expand Down Expand Up @@ -2829,7 +2829,7 @@ public function api_nodeinfo() {
global $wp_version;
$software = array(
'name' => $this->software_string(),
'version' => Mastodon_API::VERSION,
'version' => self::VERSION,
);
$software = apply_filters( 'mastodon_api_nodeinfo_software', $software );
$ret = array(
Expand Down
2 changes: 1 addition & 1 deletion includes/class-mastodon-app.php
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ public function was_used( $request, $additional_debug_data = array() ) {
}

public static function set_current_app( $client_id, $request ) {
self::$current_app = Mastodon_App::get_by_client_id( $client_id );
self::$current_app = self::get_by_client_id( $client_id );
self::$current_app->was_used( $request );
return self::$current_app;
}
Expand Down
1 change: 1 addition & 0 deletions includes/entity/class-entity.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*/

namespace Enable_Mastodon_Apps\Entity;

use Enable_Mastodon_Apps\Mastodon_API;

/**
Expand Down

0 comments on commit e682a19

Please sign in to comment.