1 | <?php |
||
16 | class Bounty |
||
|
|||
17 | { |
||
18 | /* @var string */ |
||
19 | public const FILE_NAME = 'Bounty'; |
||
20 | |||
21 | /* @var int */ |
||
22 | public const MAX_GOLD = 500; |
||
23 | |||
24 | /* @var string */ |
||
25 | public const CONFIG_GOLD = 'gold'; |
||
26 | |||
27 | /* @var string */ |
||
28 | public const CONFIG_BOUNTY = 'bounty'; |
||
29 | |||
30 | public static function init(Player $player): void |
||
38 | |||
39 | /** |
||
40 | * プレイヤーに賭ける賞金を設定します。 |
||
41 | * |
||
42 | * @param Player $player |
||
43 | * @param int $gold |
||
44 | * |
||
45 | * @throws \Error |
||
46 | */ |
||
47 | public static function setGold(Player $player, int $gold): void |
||
55 | |||
56 | /** |
||
57 | * プレイヤーに賭けられている賞金を返します。 |
||
58 | * |
||
59 | * @param Player $player |
||
60 | * |
||
61 | * @return int |
||
62 | */ |
||
63 | public static function getGold(Player $player): int |
||
69 | |||
70 | /** |
||
71 | * @param Player $player |
||
72 | * @param bool $bounty |
||
73 | */ |
||
74 | public static function setBounty(Player $player, bool $bounty): void |
||
79 | |||
80 | /** |
||
81 | * プレイヤーに賞金が賭けられているかどうかを返します。 |
||
82 | * |
||
83 | * @param Player $player |
||
84 | * |
||
85 | * @return bool |
||
86 | */ |
||
87 | public static function isBounty(Player $player): bool |
||
93 | |||
94 | /** |
||
95 | * @param Player $player |
||
96 | * |
||
97 | * @throws \ReflectionException |
||
98 | */ |
||
99 | public static function setPlayerBounty(Player $player): void |
||
117 | |||
118 | /** |
||
119 | * @param Player $player |
||
120 | * @param Player|null $killer |
||
121 | * |
||
122 | * @throws \ReflectionException |
||
123 | */ |
||
124 | public static function PlayerBountyLost(Player $player, Player $killer = null): void |
||
145 | } |
||
146 |
This check examines a number of code elements and verifies that they conform to the given naming conventions.
You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.