Merge pull request #835 from crazywhalecc/chore/test-and-validate

Chore: PHPUnit test & docs & PHPDoc for vendor mode
This commit is contained in:
Jerry Ma
2025-07-29 11:08:53 +08:00
committed by GitHub
parent 6c3ff7da32
commit fafe7d5778
27 changed files with 2112 additions and 186 deletions

View File

@@ -4,9 +4,25 @@ declare(strict_types=1);
namespace SPC\store\source;
/**
* Abstract base class for custom source implementations
*
* This class provides a framework for implementing custom source download
* logic. Extend this class to create custom source handlers.
*/
abstract class CustomSourceBase
{
/**
* The name of this source implementation
*/
public const NAME = 'unknown';
/**
* Fetch the source from its repository
*
* @param bool $force Force download even if already exists
* @param null|array $config Optional configuration array
* @param int $lock_as Lock type constant
*/
abstract public function fetch(bool $force = false, ?array $config = null, int $lock_as = SPC_DOWNLOAD_SOURCE): void;
}