phpstan: Strict check function/class name-case and fix violations

This commit is contained in:
Sukhwinder Dhillon 2024-01-17 13:25:54 +01:00 committed by Johannes Meyer
parent 35c6086db3
commit 9f58dcf8d9
10 changed files with 13 additions and 13 deletions

View File

@ -30,7 +30,7 @@ class ImportsourcesController extends ActionController
}
$this->addTitle($this->translate('Import source'))
->setAutoRefreshInterval(10)
->setAutorefreshInterval(10)
->addAddLink(
$this->translate('Add a new Import Source'),
'director/importsource/add'

View File

@ -11,7 +11,7 @@ class JobsController extends ActionController
public function indexAction()
{
$this->addTitle($this->translate('Jobs'))
->setAutoRefreshInterval(10)
->setAutorefreshInterval(10)
->addAddLink($this->translate('Add a new Job'), 'director/job/add')
->tabs(new ImportTabs())->activate('jobs');

View File

@ -62,7 +62,7 @@ class SchemaController extends ActionController
return file_get_contents(
sprintf(
'%s/schema/%s.sql',
$this->Module()->getBasedir(),
$this->Module()->getBaseDir(),
$type
)
);

View File

@ -48,7 +48,7 @@ class SyncruleController extends ActionController
*/
public function indexAction()
{
$this->setAutoRefreshInterval(10);
$this->setAutorefreshInterval(10);
$rule = $this->requireSyncRule();
$this->tabs(new SyncRuleTabs($rule))->activate('show');
$ruleName = $rule->get('rule_name');
@ -642,7 +642,7 @@ class SyncruleController extends ActionController
*/
public function historyAction()
{
$this->setAutoRefreshInterval(30);
$this->setAutorefreshInterval(30);
$rule = $this->requireSyncRule();
$this->tabs(new SyncRuleTabs($rule))->activate('history');
$this->addTitle($this->translate('Sync history') . ': ' . $rule->get('rule_name'));

View File

@ -23,7 +23,7 @@ class SyncrulesController extends ActionController
}
$this->addTitle($this->translate('Sync rule'))
->setAutoRefreshInterval(10)
->setAutorefreshInterval(10)
->addAddLink(
$this->translate('Add a new Sync Rule'),
'director/syncrule/add'

View File

@ -19,7 +19,7 @@ class IcingaTemplateChoiceForm extends DirectorObjectForm
{
if ($name !== null) {
/** @var IcingaTemplateChoice $class - cheating IDE */
$class = $this->getObjectClassName();
$class = $this->getObjectClassname();
$this->setObject($class::load($name, $this->getDb()));
}
@ -133,7 +133,7 @@ class IcingaTemplateChoiceForm extends DirectorObjectForm
/** @var IcingaTemplateChoice $object */
$object = $this->object();
$this->setSuccessUrl(
'director/templatechoice/' . $object->getObjectshortTableName(),
'director/templatechoice/' . $object->getObjectShortTableName(),
$object->getUrlParams()
);
}

View File

@ -45,7 +45,7 @@ class ImportSourceLdap extends ImportSourceHook
public static function addSettingsFormFields(QuickForm $form)
{
Util::addLDAPResourceFormElement($form, 'resource');
Util::addLdapResourceFormElement($form, 'resource');
$form->addElement('text', 'base', array(
'label' => $form->translate('LDAP Search Base'),
'description' => $form->translate(

View File

@ -176,7 +176,7 @@ class IcingaObjectResolver
$object->groups = $groups;
}
$templates = $this->getTemplateNamesById($id);
$templates = $this->getTemplateNamesByID($id);
if (! empty($templates)) {
$object->templates = \array_reverse($templates);
}

View File

@ -34,7 +34,7 @@ abstract class DirectorForm extends QuickForm
public static function load()
{
return new static([
'icingaModule' => Icinga::App()->getModuleManager()->getModule('director')
'icingaModule' => Icinga::app()->getModuleManager()->getModule('director')
]);
}

View File

@ -4,8 +4,8 @@ includes:
parameters:
level: 2
checkFunctionNameCase: false
checkInternalClassCaseSensitivity: false
checkFunctionNameCase: true
checkInternalClassCaseSensitivity: true
treatPhpDocTypesAsCertain: false
paths: