Best way would be to defined $module right before the switch or using the following comment:
/** @var string $model */
This comment will tell php-storm that $model is set and that its a string. You may also use mixed instead of string which says that it could be everything but its set.
I would recomment using the comment since it has no performance-impact on the script. Also using is_set would solve the problem but is using performance of the script.
Anyway you may only use such comments if there is no way it could be anything else and is definitly set.