event: modernize property declarations where possible

only private fields are modified; protected ones can't be changed in case someone extended the classes
This commit is contained in:
Dylan K. Taylor
2022-04-25 00:06:26 +01:00
parent ded7e24f67
commit c8a7a53d70
58 changed files with 258 additions and 444 deletions

View File

@ -27,12 +27,11 @@ use pocketmine\block\Block;
use pocketmine\player\Player;
class PlayerBedLeaveEvent extends PlayerEvent{
/** @var Block */
private $bed;
public function __construct(Player $player, Block $bed){
public function __construct(
Player $player,
private Block $bed
){
$this->player = $player;
$this->bed = $bed;
}
public function getBed() : Block{