Convert scaling code to v3

Hello,
I need help converting this code :

setupStage() {
    this.scale.scaleMode = Phaser.ScaleManager.USER_SCALE;
    if (!isMobile) this.scale.setResizeCallback(this.scaleGame);
    this.scaleGame();
  }
scaleGame = () => {
    const padding = isMobile ? 0 : 80; // include padding around the canvas frame for desktop
    const yScale = (window.innerHeight - padding) / this.game.height;
    const scale = Math.min(yScale, 1);
    this.scale.setUserScale(scale, scale);
  };

to v3.

To code is from here : Responsive phaser game

Thank you.