From 8bf9b4417adddfd9086f6d0730ea6659e1476f6b Mon Sep 17 00:00:00 2001 From: Renato Alves <19148962+renatonascalves@users.noreply.github.com> Date: Wed, 6 Sep 2023 11:02:33 -0300 Subject: [PATCH] Improving phpDoc --- includes/classes/Indexable.php | 5 ++--- includes/classes/Indexables.php | 2 +- includes/classes/SyncManager.php | 11 ++++++----- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/includes/classes/Indexable.php b/includes/classes/Indexable.php index aea845cdb1..5cbb9ebc93 100644 --- a/includes/classes/Indexable.php +++ b/includes/classes/Indexable.php @@ -12,7 +12,6 @@ use ElasticPress\Elasticsearch as Elasticsearch; use ElasticPress\SyncManager as SyncManager; -use ElasticPress\QueryIntegration as QueryIntegration; if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. @@ -49,7 +48,7 @@ abstract class Indexable { * Instance of QueryIntegration. This should handle integrating with a default * WP query. * - * @var QueryIntegration + * @var object * @since 3.0 */ public $query_integration; @@ -1149,7 +1148,7 @@ abstract public function prepare_document( $object_id ); * process across indexables. * * @param array $args Array to query DB against. - * @return boolean + * @return array */ abstract public function query_db( $args ); diff --git a/includes/classes/Indexables.php b/includes/classes/Indexables.php index da5addb0e4..4cee9d7179 100644 --- a/includes/classes/Indexables.php +++ b/includes/classes/Indexables.php @@ -152,7 +152,7 @@ public function get_all( $global = null, $slug_only = false, $status = 'active' /** * Return singleton instance of class * - * @return object + * @return self */ public static function factory() { static $instance = false; diff --git a/includes/classes/SyncManager.php b/includes/classes/SyncManager.php index 119313abc0..c2187f9f24 100644 --- a/includes/classes/SyncManager.php +++ b/includes/classes/SyncManager.php @@ -69,8 +69,9 @@ public function __construct( $indexable_slug ) { /** * Add an object to the sync queue. * - * @param id $object_id object ID to sync - * @since 3.1.2 + * @since 3.1.2 + * + * @param int $object_id Object ID to sync. * @return boolean */ public function add_to_queue( $object_id ) { @@ -95,8 +96,9 @@ public function add_to_queue( $object_id ) { /** * Remove an object from the sync queue. * - * @param id $object_id object ID to remove from the queue - * @since 3.5 + * @since 3.5 + * + * @param int $object_id Object ID to remove from the queue. * @return boolean */ public function remove_from_queue( $object_id ) { @@ -147,7 +149,6 @@ public function index_sync_queue_on_redirect( $location ) { return $location; } - /** * Sync objects in queue. *