added + $this->dupes; } /** * Check if any releases were added. */ public function hasAddedReleases(): bool { return $this->added > 0; } /** * Create from array. * * @param array{added?: int, dupes?: int} $data */ public static function fromArray(array $data): self { return new self( added: $data['added'] ?? 0, dupes: $data['dupes'] ?? 0, ); } /** * Convert to array. * * @return array{added: int, dupes: int} */ public function toArray(): array { return [ 'added' => $this->added, 'dupes' => $this->dupes, ]; } }