transaction = $transaction; $this->player = $player; } public function getTransaction() : BlockTransaction{ return $this->transaction; } /** * It returns the player which grows the structure. * It returns null when the structure grows by itself. */ public function getPlayer() : ?Player{ return $this->player; } }