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')) $this->addTitle($this->translate('Import source'))
->setAutoRefreshInterval(10) ->setAutorefreshInterval(10)
->addAddLink( ->addAddLink(
$this->translate('Add a new Import Source'), $this->translate('Add a new Import Source'),
'director/importsource/add' 'director/importsource/add'

View File

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

View File

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

View File

@ -48,7 +48,7 @@ class SyncruleController extends ActionController
*/ */
public function indexAction() public function indexAction()
{ {
$this->setAutoRefreshInterval(10); $this->setAutorefreshInterval(10);
$rule = $this->requireSyncRule(); $rule = $this->requireSyncRule();
$this->tabs(new SyncRuleTabs($rule))->activate('show'); $this->tabs(new SyncRuleTabs($rule))->activate('show');
$ruleName = $rule->get('rule_name'); $ruleName = $rule->get('rule_name');
@ -642,7 +642,7 @@ class SyncruleController extends ActionController
*/ */
public function historyAction() public function historyAction()
{ {
$this->setAutoRefreshInterval(30); $this->setAutorefreshInterval(30);
$rule = $this->requireSyncRule(); $rule = $this->requireSyncRule();
$this->tabs(new SyncRuleTabs($rule))->activate('history'); $this->tabs(new SyncRuleTabs($rule))->activate('history');
$this->addTitle($this->translate('Sync history') . ': ' . $rule->get('rule_name')); $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')) $this->addTitle($this->translate('Sync rule'))
->setAutoRefreshInterval(10) ->setAutorefreshInterval(10)
->addAddLink( ->addAddLink(
$this->translate('Add a new Sync Rule'), $this->translate('Add a new Sync Rule'),
'director/syncrule/add' 'director/syncrule/add'

View File

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

View File

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

View File

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

View File

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

View File

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