<?php
/**
 * File scan batch output.
 *
 * @package LocalGuardScanner
 */

namespace LocalGuardScanner\Application\Scan;

use LocalGuardScanner\Domain\Detection\Evidence;

/**
 * Contains inventory rows, evidence, cursor, and coverage reasons.
 */
final class FileScanBatchResult {
	/** @var array<int,array<string,mixed>> */
	private $inventory;
	/** @var array<string,Evidence[]> */
	private $evidence;
	/** @var array<string,mixed> */
	private $cursor;
	/** @var bool */
	private $done;
	/** @var array<string,int> */
	private $omissions;

	/**
	 * @param array<int,array<string,mixed>> $inventory Inventory rows.
	 * @param array<string,Evidence[]>       $evidence  Evidence by locator.
	 * @param array<string,mixed>            $cursor    Cursor.
	 * @param bool                           $done      Completion.
	 * @param array<string,int>              $omissions Coverage omissions.
	 */
	public function __construct( array $inventory, array $evidence, array $cursor, $done, array $omissions ) {
		$this->inventory = $inventory;
		$this->evidence  = $evidence;
		$this->cursor    = $cursor;
		$this->done      = (bool) $done;
		$this->omissions = $omissions;
	}

	/** @return array<int,array<string,mixed>> */
	public function inventory() {
		return $this->inventory;
	}

	/** @return array<string,Evidence[]> */
	public function evidence() {
		return $this->evidence;
	}

	/** @return array<string,mixed> */
	public function cursor() {
		return $this->cursor;
	}

	/** @return bool */
	public function done() {
		return $this->done;
	}

	/** @return array<string,int> */
	public function omissions() {
		return $this->omissions;
	}
}
