AspireSync/tests/Stubs/MetadataServiceStub.php
Chuck Adams f065b6fda1
new timestamp filtering options for sync:meta:fetch (#43)
* feat: add 'checked' column as unconditionally updated timestamp

* feat: switch filters to absolute timestamps, add --skip-checked-after

* feat: add --limit option

* fix: touch resources when checked

* style: make fix

* fix: properly handle null limit
2025-01-25 14:29:03 -07:00

61 lines
1.2 KiB
PHP

<?php
declare(strict_types=1);
namespace App\Tests\Stubs;
use App\Services\Metadata\MetadataServiceInterface;
use Generator;
class MetadataServiceStub implements MetadataServiceInterface
{
public function getUnprocessedVersions(string $slug, array $versions): array
{
return [];
}
public function getDownloadUrl(string $slug, string $version): ?string
{
return "https://example.org/download/$slug.$version";
}
public function exportAllMetadata(): Generator
{
yield from [];
}
public function save(array $metadata, bool $clobber = false): void
{
// de nada
}
public function getStatus(string $slug): ?string
{
return 'open';
}
public function getOpenVersions(?int $timestamp = 1): array
{
return [];
}
public function markProcessed(string $slug, string $version): void
{
// nothingness
}
public function getPulledAfter(int $timestamp): array
{
return [];
}
public function getCheckedAfter(int $timestamp): array
{
return [];
}
public function getAllSlugs(): array
{
return [];
}
}