- Move 12 markdown files from root to docs/ subdirectories - Organize documentation by category: • docs/troubleshooting/ (1 file) - Technical troubleshooting guides • docs/deployment/ (4 files) - Deployment and security documentation • docs/guides/ (3 files) - Feature-specific guides • docs/planning/ (4 files) - Planning and improvement proposals Root directory cleanup: - Reduced from 16 to 4 markdown files in root - Only essential project files remain: • CLAUDE.md (AI instructions) • README.md (Main project readme) • CLEANUP_PLAN.md (Current cleanup plan) • SRC_STRUCTURE_IMPROVEMENTS.md (Structure improvements) This improves: ✅ Documentation discoverability ✅ Logical organization by purpose ✅ Clean root directory ✅ Better maintainability
72 lines
1.4 KiB
PHP
72 lines
1.4 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Domain\PreSave\ValueObjects;
|
|
|
|
/**
|
|
* Registration Status Enum
|
|
*
|
|
* Status of individual pre-save registrations
|
|
*/
|
|
enum RegistrationStatus: string
|
|
{
|
|
case PENDING = 'pending';
|
|
case COMPLETED = 'completed';
|
|
case FAILED = 'failed';
|
|
case REVOKED = 'revoked';
|
|
|
|
/**
|
|
* Check if registration should be processed
|
|
*/
|
|
public function shouldProcess(): bool
|
|
{
|
|
return $this === self::PENDING;
|
|
}
|
|
|
|
/**
|
|
* Check if registration is final (cannot be retried)
|
|
*/
|
|
public function isFinal(): bool
|
|
{
|
|
return match ($this) {
|
|
self::COMPLETED, self::REVOKED => true,
|
|
default => false,
|
|
};
|
|
}
|
|
|
|
/**
|
|
* Check if registration can be retried
|
|
*/
|
|
public function canRetry(): bool
|
|
{
|
|
return $this === self::FAILED;
|
|
}
|
|
|
|
/**
|
|
* Get badge color for UI
|
|
*/
|
|
public function getBadgeColor(): string
|
|
{
|
|
return match ($this) {
|
|
self::PENDING => 'yellow',
|
|
self::COMPLETED => 'green',
|
|
self::FAILED => 'red',
|
|
self::REVOKED => 'gray',
|
|
};
|
|
}
|
|
|
|
/**
|
|
* Get display label
|
|
*/
|
|
public function getLabel(): string
|
|
{
|
|
return match ($this) {
|
|
self::PENDING => 'Pending',
|
|
self::COMPLETED => 'Completed',
|
|
self::FAILED => 'Failed',
|
|
self::REVOKED => 'Revoked',
|
|
};
|
|
}
|
|
}
|