<?php
|
declare(strict_types=1);
|
|
namespace App\LegacyImport;
|
|
class CoverImportReport {
|
/** Books that got a photo of the copy itself, found by the book ID. */
|
public int $ownById = 0;
|
|
/** Books that got a photo of the copy itself, found by ISBN. */
|
public int $ownByIsbn = 0;
|
|
/** Books that got the publisher's cover, found by ISBN. */
|
public int $byIsbn = 0;
|
|
/** Books that already had a cover, which was kept. */
|
public int $alreadyCovered = 0;
|
|
/** @var list<string> Files whose name does not match a book. */
|
public array $unmatched = [];
|
|
/** @var list<string> Files that are neither an ISBN-13 nor a book ID. */
|
public array $ignored = [];
|
|
/** @var list<string> Files that could not be stored as covers, with the reason. */
|
public array $failed = [];
|
|
public function imported(): int {
|
return $this->ownById + $this->ownByIsbn + $this->byIsbn;
|
}
|
}
|