Improve registerService logic for ProvisioningApiMiddleware for static code analysis
Improve registerService logic for ProvisioningApiMiddleware for static code analysis

Signed-off-by: Daniel Kesselberg <1d6e1cf70ec6f9ab28d3ea4b27a49a77654d370e@danielkesselberg.de>
Signed-off-by: Morris Jobke <7f550a9f4c44173a37664d938f1355f0f92a47a7@morrisjobke.de>

andreas-p/nextcloud-server,andreas-p/nextcloud-server,nextcloud/server,nextcloud/server,andreas-p/nextcloud-server,andreas-p/nextcloud-server,andreas-p/nextcloud-server,nextcloud/server,nextcloud/server