| 1 | <?php |
||
| 14 | abstract class AbstractFactory |
||
| 15 | { |
||
| 16 | /** @var int */ |
||
| 17 | protected $duration; |
||
| 18 | |||
| 19 | /** @var float */ |
||
| 20 | protected $ration; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * AbstractFactory constructor. |
||
| 24 | * |
||
| 25 | * @param int $duration |
||
| 26 | * @param float $ration |
||
| 27 | */ |
||
| 28 | 4 | public function __construct(int $duration, float $ration) |
|
| 33 | |||
| 34 | /** |
||
| 35 | * Create a new vote. |
||
| 36 | * |
||
| 37 | * @param Player $player Player that started the vote. |
||
| 38 | * |
||
| 39 | * @return AbstractVote |
||
| 40 | */ |
||
| 41 | public abstract function create(Player $player) : AbstractVote; |
||
| 42 | |||
| 43 | /** |
||
| 44 | * Get the code of the vote type. |
||
| 45 | * |
||
| 46 | * @return string |
||
| 47 | */ |
||
| 48 | public abstract function getVoteCode() : string; |
||
| 49 | |||
| 50 | /** |
||
| 51 | * Get types of MP votes it replaces. |
||
| 52 | * |
||
| 53 | * @return array |
||
| 54 | */ |
||
| 55 | public abstract function getReplacementTypes(); |
||
| 56 | } |