Split detail page contracts

This commit is contained in:
2026-03-19 19:04:28 +01:00
parent f6046c9168
commit 522705dd33
21 changed files with 729 additions and 121 deletions

23
lib/Console/Command.php Normal file
View File

@@ -0,0 +1,23 @@
<?php
namespace MintyPHP\Console;
/**
* Base class for CLI commands.
*
* Subclasses define a name (e.g. 'module:sync') and implement execute().
* Arguments and options are passed as a simple parsed array.
*/
abstract class Command
{
abstract public function name(): string;
abstract public function description(): string;
/**
* @param list<string> $args Positional arguments (after the command name)
* @param array<string, string|bool> $options Parsed --key=value and --flag options
* @return int Exit code (0 = success)
*/
abstract public function execute(array $args, array $options): int;
}