mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 09:18:54 +00:00
38 lines
690 B
PHP
38 lines
690 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;
|
|
}
|
|
}
|
|
|