chore(2meet-data-optimizer): make the hardening branch pass PHPStan and PHPCS
Anti-EAV Lint + Quality Gate / anti-eav-lint (pull_request) Successful in 14s
Tests / PHP Lint (pull_request) Successful in 1m0s
Tests / PHPCS (pull_request) Successful in 1m15s
Tests / Unit Tests (pull_request) Successful in 57s
Tests / Integration Tests (pull_request) Successful in 1m14s
Tests / PHPStan (pull_request) Successful in 34s
Anti-EAV Lint + Quality Gate / anti-eav-lint (pull_request) Successful in 14s
Tests / PHP Lint (pull_request) Successful in 1m0s
Tests / PHPCS (pull_request) Successful in 1m15s
Tests / Unit Tests (pull_request) Successful in 57s
Tests / Integration Tests (pull_request) Successful in 1m14s
Tests / PHPStan (pull_request) Successful in 34s
- CI PHPStan (level 6, baseline for pre-existing debt) failed on 35 errors in
code added on hardening/2.0: missing iterable value types (PHPDoc only), a
redundant method_exists() in uninstall.php, and the new WP-CLI commands
registered as array('Class', 'instanceMethod') — now array(new Class(), ...)
- Local runs had been masked by a PHPStan tmpDir shared with the act CI runner
(cached container pointing at a removed phar); use a private tmpDir
- Verify: phpstan (private tmpDir) no errors, phpcs clean on changed files,
phpunit Unit 658 OK; dev22 (running this branch) CLI post-status-sync /
bridge-restore-native dry runs OK
This commit is contained in:
@@ -72,7 +72,7 @@ final class TMDO_Post_Group_Reconciler {
|
||||
*
|
||||
* @param bool $dry_run Count only; write nothing.
|
||||
* @param int $batch Rows per batch.
|
||||
* @return array{moves: array<int, array>, enabled: bool}
|
||||
* @return array{moves: array<int, array<string, mixed>>, enabled: bool}
|
||||
*/
|
||||
public static function run( bool $dry_run = false, int $batch = 500 ): array {
|
||||
global $wpdb;
|
||||
@@ -165,9 +165,9 @@ final class TMDO_Post_Group_Reconciler {
|
||||
/**
|
||||
* FROM/WHERE for non-NULL legacy values of the move's post types.
|
||||
*
|
||||
* @param array $move One entry of plan().
|
||||
* @param string $id_col Entity id column of the flat tables.
|
||||
* @return array{0:string, 1:array}
|
||||
* @param array<string, mixed> $move One entry of plan().
|
||||
* @param string $id_col Entity id column of the flat tables.
|
||||
* @return array{0:string, 1:array<int, mixed>}
|
||||
*/
|
||||
private static function source_clause( array $move, string $id_col ): array {
|
||||
global $wpdb;
|
||||
@@ -184,9 +184,9 @@ final class TMDO_Post_Group_Reconciler {
|
||||
/**
|
||||
* Upsert one column of the target group rows and drop their cached copies.
|
||||
*
|
||||
* @param array $move One entry of plan().
|
||||
* @param string $id_col Entity id column of the flat tables.
|
||||
* @param array $rows Source rows: list of { id, v }.
|
||||
* @param array<string, mixed> $move One entry of plan().
|
||||
* @param string $id_col Entity id column of the flat tables.
|
||||
* @param array<int, array<string, mixed>> $rows Source rows: list of { id, v }.
|
||||
* @return int Rows written.
|
||||
*/
|
||||
private static function copy_rows( array $move, string $id_col, array $rows ): int {
|
||||
|
||||
Reference in New Issue
Block a user