From 2a96b4220f70a82bca6de8d38157499f6ac4cf49 Mon Sep 17 00:00:00 2001 From: shail-mehta Date: Sat, 31 Aug 2024 20:38:33 +0530 Subject: [PATCH 1/3] Added @global documentation in several files --- includes/Admin/Admin_AJAX.php | 3 +++ includes/Checker/Abstract_Check_Runner.php | 3 +++ includes/Utilities/Plugin_Request_Utility.php | 2 ++ 3 files changed, 8 insertions(+) diff --git a/includes/Admin/Admin_AJAX.php b/includes/Admin/Admin_AJAX.php index e202b03e1..f09cc9ac6 100644 --- a/includes/Admin/Admin_AJAX.php +++ b/includes/Admin/Admin_AJAX.php @@ -145,6 +145,9 @@ public function set_up_environment() { * Handles the AJAX request to cleanup the runtime environment. * * @since 1.0.0 + * + * @global wpdb $wpdb WordPress database abstraction object. + * @global string $table_prefix The database table prefix. */ public function clean_up_environment() { global $wpdb, $table_prefix; diff --git a/includes/Checker/Abstract_Check_Runner.php b/includes/Checker/Abstract_Check_Runner.php index 2d42f6836..78aa35ecd 100644 --- a/includes/Checker/Abstract_Check_Runner.php +++ b/includes/Checker/Abstract_Check_Runner.php @@ -319,6 +319,9 @@ final public function prepare() { * * @since 1.0.0 * + * @global wpdb $wpdb WordPress database abstraction object. + * @global string $table_prefix The database table prefix. + * * @return Check_Result An object containing all check results. */ final public function run() { diff --git a/includes/Utilities/Plugin_Request_Utility.php b/includes/Utilities/Plugin_Request_Utility.php index f6e0c11c5..37b1c1868 100644 --- a/includes/Utilities/Plugin_Request_Utility.php +++ b/includes/Utilities/Plugin_Request_Utility.php @@ -187,6 +187,8 @@ public static function get_files_to_ignore() { * * @since 1.1.0 * + * @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass. + * * @param string $plugin_url The URL of the plugin to download. * @return string The plugin basename after downloading and installing the plugin. * From ce93a949911811563d6d939e648f5986448420fd Mon Sep 17 00:00:00 2001 From: shail-mehta Date: Sat, 31 Aug 2024 20:41:15 +0530 Subject: [PATCH 2/3] Added @global documentation in several files --- includes/Checker/Runtime_Environment_Setup.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/includes/Checker/Runtime_Environment_Setup.php b/includes/Checker/Runtime_Environment_Setup.php index ccdc9e5fc..e8b13e8ba 100644 --- a/includes/Checker/Runtime_Environment_Setup.php +++ b/includes/Checker/Runtime_Environment_Setup.php @@ -18,6 +18,10 @@ final class Runtime_Environment_Setup { * Sets up the WordPress environment for runtime checks * * @since 1.0.0 + * + * @global wpdb $wpdb WordPress database abstraction object. + * @global string $table_prefix The database table prefix. + * @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass. */ public function set_up() { global $wpdb, $table_prefix, $wp_filesystem; From ae1f736a6d31996aa4505af8e388f2bb3c82e29c Mon Sep 17 00:00:00 2001 From: shail-mehta Date: Sun, 1 Sep 2024 09:20:54 +0530 Subject: [PATCH 3/3] Added Suggested changes --- includes/Admin/Admin_AJAX.php | 2 +- includes/Checker/Abstract_Check_Runner.php | 2 +- includes/Checker/Runtime_Environment_Setup.php | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/Admin/Admin_AJAX.php b/includes/Admin/Admin_AJAX.php index f09cc9ac6..05362b962 100644 --- a/includes/Admin/Admin_AJAX.php +++ b/includes/Admin/Admin_AJAX.php @@ -146,7 +146,7 @@ public function set_up_environment() { * * @since 1.0.0 * - * @global wpdb $wpdb WordPress database abstraction object. + * @global wpdb $wpdb WordPress database abstraction object. * @global string $table_prefix The database table prefix. */ public function clean_up_environment() { diff --git a/includes/Checker/Abstract_Check_Runner.php b/includes/Checker/Abstract_Check_Runner.php index 78aa35ecd..025dc108b 100644 --- a/includes/Checker/Abstract_Check_Runner.php +++ b/includes/Checker/Abstract_Check_Runner.php @@ -319,7 +319,7 @@ final public function prepare() { * * @since 1.0.0 * - * @global wpdb $wpdb WordPress database abstraction object. + * @global wpdb $wpdb WordPress database abstraction object. * @global string $table_prefix The database table prefix. * * @return Check_Result An object containing all check results. diff --git a/includes/Checker/Runtime_Environment_Setup.php b/includes/Checker/Runtime_Environment_Setup.php index e8b13e8ba..86d1d4e8c 100644 --- a/includes/Checker/Runtime_Environment_Setup.php +++ b/includes/Checker/Runtime_Environment_Setup.php @@ -19,8 +19,8 @@ final class Runtime_Environment_Setup { * * @since 1.0.0 * - * @global wpdb $wpdb WordPress database abstraction object. - * @global string $table_prefix The database table prefix. + * @global wpdb $wpdb WordPress database abstraction object. + * @global string $table_prefix The database table prefix. * @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass. */ public function set_up() {