stderr('Invalid Lakala account ID: ' . $value . PHP_EOL); return ExitCode::USAGE; } $ids[] = (int)$value; } $ids = array_values(array_unique($ids)); if (empty($ids)) { $this->stderr('At least one Lakala account ID is required.' . PHP_EOL); return ExitCode::USAGE; } $failed = 0; foreach ($ids as $accountId) { if (!LakalaAccountClass::refreshAuthorizeStates($accountId)) { $failed++; } } $this->stdout('Lakala authorize refresh completed: total=' . count($ids) . ', failed=' . $failed . ', accountIds=' . $accountIds . PHP_EOL); return $failed === 0 ? ExitCode::OK : ExitCode::UNSPECIFIED_ERROR; } }