Assuming you have a Player object, $player->setMaxHealth() should work. Keep in mind 20 should be the default max, with 1 equalling half of a heart. You may also need to use $player->setHealth(), since setting the max health won't necessarily set them to full health.
i'll make it short and simple PHP: /* @var Player $player */$addition = 1; // this equals to half a heart in minecraft // you can modify this value to anything you want$player->setMaxHealth($player->getMaxHealth() + $addition);