array( 'type' => 'array' ), 'total' => array( 'type' => 'integer' ), ); } protected function annotations(): array { return array( 'readonly' => true, 'destructive' => false, 'idempotent' => true, ); } /** * @param array $input Input. * @return array */ protected function run( array $input ) { $rows = Database_Repository::counts(); $total = 0; foreach ( $rows as $row ) { $total += (int) $row['count']; } return array( 'types' => $rows, 'total' => $total, 'message' => sprintf( /* translators: %d: total rows */ __( '%d row(s) could be cleaned up.', 'acrossai-abilities-manager' ), $total ), ); } }