As wmf deployed extension the WikimediaMaintenance extension should run phan on CI to found simple bugs in an earlier state of development.
WikimediaMaintenance extension is not using the common /includes/ or /src/ folder, which makes the config for phan a bit harder.
Some of the maintenance script are in global scope and than the globals are not detected by phan.