diff --git a/src/Admin/AbstractOptionsPage.php b/src/Admin/AbstractOptionsPage.php index 673b216..532700a 100644 --- a/src/Admin/AbstractOptionsPage.php +++ b/src/Admin/AbstractOptionsPage.php @@ -95,7 +95,7 @@ public function render(): void { /** * Configure the admin page using the settings API. */ - abstract public function configure(); + abstract public function configure(): void; /** * Get the capability required to view the admin pages. @@ -160,7 +160,7 @@ abstract public function enqueue_page_assets( string $hook ): void; * @param string $page_slug The page slug. * @param string $script_handle The script handle. */ - abstract public function localize_script( string $page_slug, string $script_handle ); + abstract public function localize_script( string $page_slug, string $script_handle ): void; /** * Add body class. diff --git a/src/Admin/MetaBox.php b/src/Admin/MetaBox.php index 8623221..fca1f79 100644 --- a/src/Admin/MetaBox.php +++ b/src/Admin/MetaBox.php @@ -45,7 +45,7 @@ public static function register( Options $options ): void { /** * Add "GTM Kit" meta box */ - public function add_meta_boxes() { + public function add_meta_boxes(): void { if ( current_user_can( 'manage_options' ) ) { $post_types = get_post_types( [ @@ -77,7 +77,7 @@ public function add_meta_boxes() { /** * Displays some checkbox to de/activate some cache options */ - public function display_meta_boxes() { + public function display_meta_boxes(): void { if ( current_user_can( 'manage_options' ) ) { wp_nonce_field( 'gtmkit_box_option', '_gtmkitnonce', false ); $page_type = get_post_meta( get_the_ID(), 'gtmkit_page_type', true ); @@ -103,7 +103,7 @@ public function display_meta_boxes() { /** * Manage the cache options from the meta box. */ - public function save_meta_box_options() { + public function save_meta_box_options(): void { if ( current_user_can( 'manage_options' ) && isset( $_POST['post_ID'], $_POST['_gtmkitnonce'] ) ) { check_admin_referer( 'gtmkit_box_option', '_gtmkitnonce' ); diff --git a/src/Admin/SetupWizard.php b/src/Admin/SetupWizard.php index 5f4cd73..81edfbe 100644 --- a/src/Admin/SetupWizard.php +++ b/src/Admin/SetupWizard.php @@ -75,7 +75,7 @@ public static function get_site_url(): string { /** * Maybe redirect to the setup wizard after plugin activation. */ - public function maybe_redirect_after_activation() { + public function maybe_redirect_after_activation(): void { if ( wp_doing_ajax() || wp_doing_cron() ) { return; @@ -118,7 +118,7 @@ public function add_dashboard_page(): void { * * @param string $hook The asset hook. */ - public function enqueue_assets( string $hook ) { + public function enqueue_assets( string $hook ): void { if ( strpos( $hook, self::SLUG ) === false ) { return; @@ -159,7 +159,7 @@ public function enqueue_assets( string $hook ) { /** * Setup Wizard Content */ - public function setup_wizard_content() { + public function setup_wizard_content(): void { $admin_url = is_network_admin() ? network_admin_url() : admin_url(); $this->settings_error_page( 'gtmkit-settings', '' . esc_html__( 'Go back to the Dashboard', 'gtm-kit' ) . '' ); diff --git a/src/Integration/WooCommerce.php b/src/Integration/WooCommerce.php index c1b9bcb..50fb349 100644 --- a/src/Integration/WooCommerce.php +++ b/src/Integration/WooCommerce.php @@ -1066,7 +1066,7 @@ public function Compatibility_With_TI_Wishlist( array $item_data ): array { /** * Registers the actual data into each endpoint. */ - public function extend_store() { + public function extend_store(): void { // Register into `cart/items`. $this->extend->register_endpoint_data(