Skip to content

Commit

Permalink
phpcs error fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
diDroid committed Apr 24, 2024
1 parent 29fd1ef commit 99437ce
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion includes/Migration.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,6 @@ public function register_routes() {
* Triggers on instawp connect installation
*/
public function on_update_nfd_migrate_site() {
$response = $this->insta_service->InstallInstaWpConnect();
$response = $this->insta_service->install_instawp_connect();
}
}
8 changes: 4 additions & 4 deletions includes/RestApi/MigrateController.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function register_routes() {
array(
array(
'methods' => \WP_REST_Server::READABLE,
'callback' => array( $this, 'connectInstawp' ),
'callback' => array( $this, 'connect_instawp' ),
'permission_callback' => array( $this, 'rest_is_authorized_admin' ),
),
)
Expand All @@ -47,9 +47,9 @@ public function register_routes() {
*
* @return array
*/
public function connectInstawp() {
$instaService = new InstaMigrateService();
$response = $instaService->InstallInstaWpConnect();
public function connect_instawp() {
$insta_service = new InstaMigrateService();
$response = $insta_service->install_instawp_connect();

return $response;
}
Expand Down
4 changes: 2 additions & 2 deletions includes/Services/InstaMigrateService.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ class InstaMigrateService {
/**
* Set required api keys for insta to initiate the migration
*/
function __construct() {
public function __construct() {
Helper::set_api_domain( INSTAWP_API_DOMAIN );
}
/**
* Install InstaWP plugin
*/
public function InstallInstaWpConnect() {
public function install_instawp_connect() {
if ( ! function_exists( 'get_plugins' ) || ! function_exists( 'get_mu_plugins' ) ) {
require_once ABSPATH . 'wp-admin/includes/plugin.php';
}
Expand Down
1 change: 1 addition & 0 deletions includes/Services/UtilityService.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public static function get_insta_api_key() {
);
$insta_response = json_decode( wp_remote_retrieve_body( $insta_cf_data ) );

// phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_decode
return $insta_response ? base64_decode( $insta_response->data ) : '';
}
}

0 comments on commit 99437ce

Please sign in to comment.