Files
newznab-tmux/app/Enums/FileCompletionStatus.php
DariusIII 0c6ce9974a CS fixes
2026-01-07 14:51:28 +01:00

37 lines
689 B
PHP

<?php
declare(strict_types=1);
namespace App\Enums;
/**
* Binary file completion status during collection processing.
*/
enum FileCompletionStatus: int
{
/** File/binary is still incomplete (missing parts) */
case Incomplete = 0;
/** File/binary has all parts */
case Complete = 1;
/**
* Get human-readable description.
*/
public function description(): string
{
return match ($this) {
self::Incomplete => 'Incomplete',
self::Complete => 'Complete',
};
}
/**
* Check if file is complete.
*/
public function isComplete(): bool
{
return $this === self::Complete;
}
}