mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 18:32:55 +00:00
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:
@ -34,23 +34,12 @@ use function is_a;
|
||||
*/
|
||||
class PlayerCreationEvent extends Event{
|
||||
|
||||
/** @var NetworkSession */
|
||||
private $session;
|
||||
/** @phpstan-var class-string<Player> */
|
||||
private string $baseClass = Player::class;
|
||||
/** @phpstan-var class-string<Player> */
|
||||
private string $playerClass = Player::class;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
* @phpstan-var class-string<Player>
|
||||
*/
|
||||
private $baseClass = Player::class;
|
||||
/**
|
||||
* @var string
|
||||
* @phpstan-var class-string<Player>
|
||||
*/
|
||||
private $playerClass = Player::class;
|
||||
|
||||
public function __construct(NetworkSession $session){
|
||||
$this->session = $session;
|
||||
}
|
||||
public function __construct(private NetworkSession $session){}
|
||||
|
||||
public function getNetworkSession() : NetworkSession{
|
||||
return $this->session;
|
||||
|
Reference in New Issue
Block a user