fingerprints[] = $fingerprint; } public function current(): Fingerprint { return $this->fingerprints[$this->position]; } public function next(): void { $this->position++; } public function key(): int { return $this->position; } public function valid(): bool { return isset($this->fingerprints[$this->position]); } public function rewind(): void { $this->position = 0; } public function jsonSerialize(): array { $fingerprints = []; foreach ($this->fingerprints as $fingerprint) { $fingerprints[] = $fingerprint->jsonSerialize(); } return $fingerprints; } }