|null */ public static function read(string $file): ?array { // phpcs:ignore WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents -- a local file inside this site, never a URL. $raw = is_readable($file) ? file_get_contents($file) : false; $decoded = $raw === false ? null : json_decode($raw, true); return is_array($decoded) ? $decoded : null; } }