| 1 | <?php |
||
| 19 | class Priority |
||
| 20 | { |
||
| 21 | /** |
||
| 22 | * @var int |
||
| 23 | */ |
||
| 24 | private $value; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Constructor. |
||
| 28 | * |
||
| 29 | * @param int $priority |
||
| 30 | * |
||
| 31 | * @throws \InvalidArgumentException |
||
| 32 | */ |
||
| 33 | public function __construct(int $priority) |
||
| 44 | |||
| 45 | /** |
||
| 46 | * Create immediately priority |
||
| 47 | * |
||
| 48 | * @return Priority |
||
| 49 | */ |
||
| 50 | public static function immediately(): Priority |
||
| 54 | |||
| 55 | /** |
||
| 56 | * Create priority with power considerations |
||
| 57 | * |
||
| 58 | * @return Priority |
||
| 59 | */ |
||
| 60 | public static function powerConsiderations(): Priority |
||
| 64 | |||
| 65 | /** |
||
| 66 | * Get value |
||
| 67 | * |
||
| 68 | * @return int |
||
| 69 | */ |
||
| 70 | public function getValue(): int |
||
| 74 | } |
||
| 75 |