Files
2meet-data-optimizer/includes/back-compat/interface-wpdo-entity-adapter-alias.php
wpdev 76c01e44df refactor: 全部 128 個生產檔加入 declare(strict_types=1)(PR-H)
對齊 A v3.2.0。型別強制會把隱式轉換變成 TypeError,所以一次全檔加入
並跑完整測試(unit 451 / integration 398 全綠,無迴歸)。

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TbG1keQQ7XBa7qMQY16KCY
2026-07-31 06:13:33 +08:00

33 lines
1.1 KiB
PHP

<?php
/**
* Backward-compat interface alias.
*
* PHP class_alias() does NOT support interfaces. This file declares
* `WPDO_Entity_Adapter_Interface` as a child of `TMDO_Entity_Adapter_Interface`
* (no new methods), which allows sister plugins that type-hint against the old
* name to keep working: the four TMDO adapters implement this interface, so
* `instanceof WPDO_Entity_Adapter_Interface` returns true for all of them.
*
* Loaded by `class-tmdo-back-compat.php` after the real interface is loaded.
*
* @package TMDO
* @since 0.1.0
*/
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
if ( ! interface_exists( 'WPDO_Entity_Adapter_Interface', false ) && interface_exists( 'TMDO_Entity_Adapter_Interface', false ) ) {
/**
* Backward-compat alias interface. Any class implementing
* `WPDO_Entity_Adapter_Interface` automatically satisfies
* `TMDO_Entity_Adapter_Interface` and vice-versa.
*
* Will emit `_doing_it_wrong()` notice in v0.2.0+.
*/
interface WPDO_Entity_Adapter_Interface extends TMDO_Entity_Adapter_Interface {}
}