mirror of
https://gh.wpcy.net/https://github.com/aspirepress/AspireSync.git
synced 2026-05-31 23:54:06 +08:00
* 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
61 lines
1.2 KiB
PHP
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 [];
|
|
}
|
|
}
|