refactor: one wpdb accessor style (L4)

The three lazy db() methods use the $this->db ?? $GLOBALS['wpdb'] one-liner that
SampledMetaSource, MediaUsageFinder and ConnectionRepository already use.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-09-26 17:36:23 +02:00
co-authored by Claude Opus 5.5
parent b6984d3f9a
commit fb6eabf80c
3 changed files with 3 additions and 18 deletions
@@ -490,11 +490,6 @@ final class DiviReplaceTextAbility implements Ability
private function db(): \wpdb
{
if ($this->db === null) {
global $wpdb;
$this->db = $wpdb;
}
return $this->db;
return $this->db ?? $GLOBALS['wpdb'];
}
}