@@ -165,7 +165,11 @@ public function drop() {
165165 do_action ( 'stellarwp_pre_drop_table ' , $ base_table_name , $ this_table , $ this );
166166
167167 global $ wpdb ;
168- // Disable foreign key checks so we can drop without issues.
168+
169+ /**
170+ * Disable foreign key checks so we can drop without issues.
171+ * @var \stdClass $key_check
172+ */
169173 $ key_check = $ this ->db ::get_row ( "SHOW VARIABLES LIKE 'foreign_key_checks' " );
170174 if ( strtolower ( $ key_check ->Value ) === 'on ' ) {
171175 $ this ->db ::query ( "SET foreign_key_checks = 'OFF' " );
@@ -510,6 +514,7 @@ public static function uid_column() {
510514 * {@inheritdoc}
511515 */
512516 public function update () {
517+ // @phpstan-ignore-next-line
513518 require_once ABSPATH . 'wp-admin/includes/upgrade.php ' ;
514519
515520 $ sql = $ this ->get_sql ();
@@ -568,11 +573,11 @@ public function update() {
568573 * @since 1.1.3
569574 *
570575 * @param string $foreign_key The foreign key to check for.
571- * @param string|null $table_name The table name to check. Defaults to the current table.
576+ * @param string $table_name The table name to check. Defaults to the current table.
572577 *
573578 * @return bool Whether the foreign key exists on the table.
574579 */
575- public function has_foreign_key ( string $ foreign_key , string $ table_name = null ): bool {
580+ public function has_foreign_key ( string $ foreign_key , string $ table_name = '' ): bool {
576581 $ table_name = $ table_name ?: static ::table_name ();
577582
578583 $ count = $ this ->db ::table ( $ this ->db ::raw ( 'information_schema.statistics ' ) )
0 commit comments