| @@ -18,9 +18,9 @@ | ||
| 18 | 18 | |
| 19 | 19 | /** |
| 20 | 20 | * Constructs a Wpdb_Helper instance. |
| 21 | 21 | * |
| 22 | - * @param param wpdb $wpdb The WordPress database instance. | |
| 22 | + * @param wpdb $wpdb The WordPress database instance. | |
| 23 | 23 | */ |
| 24 | 24 | public function __construct( wpdb $wpdb ) { |
| 25 | 25 | $this->wpdb = $wpdb; |
| 26 | 26 | } |
| @@ -32,11 +32,11 @@ | ||
| 32 | 32 | * |
| 33 | 33 | * @return bool Whether the table exists. |
| 34 | 34 | */ |
| 35 | 35 | public function table_exists( $table ) { |
| 36 | - // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared -- Reason: There is no unescaped user input. | |
| 36 | + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.PreparedSQL.InterpolatedNotPrepared -- Reason: There is no unescaped user input. | |
| 37 | 37 | $table_exists = $this->wpdb->get_var( "SHOW TABLES LIKE '{$table}'" ); |
| 38 | - if ( is_wp_error( $table_exists ) || is_null( $table_exists ) ) { | |
| 38 | + if ( \is_wp_error( $table_exists ) || $table_exists === null ) { | |
| 39 | 39 | return false; |
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | return true; |