Files
2meet-data-optimizer/phpstan.neon
T
wpdev f524ea3f16 build: 移植 PHPCS + PHPStan L6 品質 gate(PR-I 前半)
- phpcs.xml(自 A 移植):ruleset 改名、*/tools/* 例外換成 */back-compat/*、
  中文註解全域排除 Squiz.Commenting.InlineComment.InvalidEndChar、
  interface 別名檔排除 OneObjectStructurePerFile
- 檔頭正規化:16 個檔案的 declare(strict_types=1) 與前導 // 註解移到
  file docblock 之後,並移除 <?php 後多餘空行(phpcbf 另自動修 190 處)
- phpstan.neon + .phpstan/stubs.php(TMDO_ 與 WPDO_ 兩套常數)+
  重新產生的 phpstan-baseline.neon(710 errors,A 的 3877 行 baseline
  因前綴與路徑不同無法沿用)

現況:PHPCS 0 errors / 0 warnings、PHPStan L6 No errors、
unit 451 / integration 398 GREEN

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

30 lines
1.0 KiB
Plaintext

includes:
- vendor/szepeviktor/phpstan-wordpress/extension.neon
# Baseline: existing type-completeness debt (mostly missing iterable value
# types + WP template-scope variables). New code is checked clean at L6.
# Burn down incrementally; regenerate with `composer stan:baseline`.
- phpstan-baseline.neon
parameters:
level: 6
paths:
- includes
- admin
- cli
- modules
- 2meet-data-optimizer.php
- uninstall.php
bootstrapFiles:
# Plugin constants (define()'d at runtime; PHPStan can't see them).
- .phpstan/stubs.php
scanFiles:
# WP-CLI classes/functions (runtime-injected by wp-cli; use official stubs).
- vendor/php-stubs/wp-cli-stubs/wp-cli-stubs.php
excludePaths:
- vendor
- tests
- .phpstan
# interface wrappers: PHPStan sees WPDO_X extends TMDO_X as circular
- includes/back-compat
reportUnmatchedIgnoredErrors: false
treatPhpDocTypesAsCertain: false