mirror of
https://github.com/koel/koel
synced 2024-12-23 19:13:06 +00:00
23 lines
493 B
PHP
23 lines
493 B
PHP
<?php
|
|
|
|
namespace App\Values;
|
|
|
|
use Illuminate\Support\Collection;
|
|
|
|
final class SyncResult
|
|
{
|
|
private function __construct(public Collection $success, public Collection $bad, public Collection $unmodified)
|
|
{
|
|
}
|
|
|
|
public static function init(): self
|
|
{
|
|
return new self(collect(), collect(), collect());
|
|
}
|
|
|
|
/** @return Collection|array<string> */
|
|
public function validEntries(): Collection
|
|
{
|
|
return $this->success->merge($this->unmodified);
|
|
}
|
|
}
|