Code check error: "Static method of private class must not be called"

i’ve been trying for a long time to fix this stubborn error.

How to replace following code to make our App fully compliant to “occ app:check-code”?

namespace OCA\TuxedoRegister\AppInfo;

		'style' => 'primary', // as of NC18
		'name' => 'Registrieren',
		'href' => \OC::$server->getURLGenerator()

\OCP\Util::addStyle('tuxedoregister', 'style');

The code adds a link on the login page to our register form.

I get following error:

sudo -u apache php occ app:check-code tuxedoregister
Analysing /var/www/html/nextcloud/apps/tuxedoregister/appinfo/app.php
 1 errors
    line    4: OC_App - Static method of private class must not be called
App is not compliant

The App works fine and doesn’t create any nextcloud error logs.

There is currently no other way, but it’s okay to ignore this for the time being

1 Like

Thank you. :+1: