mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-20 07:39:42 +00:00
Modernize private property declarations in src/item
This commit is contained in:
@@ -29,21 +29,10 @@ namespace pocketmine\item\enchantment;
|
||||
* Note: This class is assumed to be immutable. Consider this before making alterations.
|
||||
*/
|
||||
final class EnchantmentInstance{
|
||||
/** @var Enchantment */
|
||||
private $enchantment;
|
||||
/** @var int */
|
||||
private $level;
|
||||
|
||||
/**
|
||||
* EnchantmentInstance constructor.
|
||||
*
|
||||
* @param Enchantment $enchantment Enchantment type
|
||||
* @param int $level Level of enchantment
|
||||
*/
|
||||
public function __construct(Enchantment $enchantment, int $level = 1){
|
||||
$this->enchantment = $enchantment;
|
||||
$this->level = $level;
|
||||
}
|
||||
public function __construct(
|
||||
private Enchantment $enchantment,
|
||||
private int $level = 1
|
||||
){}
|
||||
|
||||
/**
|
||||
* Returns the type of this enchantment.
|
||||
|
Reference in New Issue
Block a user