*/ public array $numbers = []; /** @var int 号码总数 */ public int $total = 0; /** * @param string $number 号码 * @param bool $isOnline 是否在线 * @param int $newFollowersToday 今日进线 */ public function addNumber(string $number, bool $isOnline, int $newFollowersToday = 0): void { $number = trim($number); if ($number === '') { return; } $this->numbers[] = [ 'number' => $number, 'status' => $isOnline ? 'online' : 'offline', 'newFollowersToday' => max(0, $newFollowersToday), ]; if ($isOnline) { $this->totalOnline++; } else { $this->totalOffline++; } } }