diff --git a/includes/modules/ajax/ajax.php b/includes/modules/ajax/ajax.php index edca8c8..a50f101 100644 --- a/includes/modules/ajax/ajax.php +++ b/includes/modules/ajax/ajax.php @@ -21,7 +21,7 @@ final class Ajax { * * @since NEXT */ - protected function add_hooks() { + protected function add_hooks(): void { add_action( 'wp_ajax_anys', [ $this, 'handle_request' ] ); add_action( 'wp_ajax_nopriv_anys', [ $this, 'handle_request' ] ); } @@ -31,7 +31,7 @@ protected function add_hooks() { * * @since NEXT */ - public function handle_request() { + public function handle_request(): void { // Verifies the nonce. check_ajax_referer( 'anys_nonce' ); diff --git a/includes/modules/assets/assets.php b/includes/modules/assets/assets.php index c72cf25..10b6191 100644 --- a/includes/modules/assets/assets.php +++ b/includes/modules/assets/assets.php @@ -21,7 +21,7 @@ final class Assets { * * @since NEXT */ - protected function add_hooks() { + protected function add_hooks(): void { add_action( 'init', [ $this, 'register_assets' ] ); add_action( 'wp_head', [ $this, 'localize_data' ] ); @@ -33,7 +33,7 @@ protected function add_hooks() { * * @since NEXT */ - protected function get_assets() { + protected function get_assets(): array { $assets = [ 'styles' => [ 'anys-utilities' => [ @@ -69,7 +69,7 @@ protected function get_assets() { * * @since NEXT */ - public function register_assets() { + public function register_assets(): void { $assets = $this->get_assets(); // Registers styles. @@ -109,7 +109,7 @@ public function register_assets() { * * @since NEXT */ - public function localize_data() { + public function localize_data(): void { ?>