mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-28 16:24:05 +02:00
phpstan: Strict check function/class
name-case and fix violations
This commit is contained in:
parent
35c6086db3
commit
9f58dcf8d9
@ -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'
|
||||
|
@ -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');
|
||||
|
||||
|
@ -62,7 +62,7 @@ class SchemaController extends ActionController
|
||||
return file_get_contents(
|
||||
sprintf(
|
||||
'%s/schema/%s.sql',
|
||||
$this->Module()->getBasedir(),
|
||||
$this->Module()->getBaseDir(),
|
||||
$type
|
||||
)
|
||||
);
|
||||
|
@ -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'));
|
||||
|
@ -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'
|
||||
|
@ -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()
|
||||
);
|
||||
}
|
||||
|
@ -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(
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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')
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -4,8 +4,8 @@ includes:
|
||||
parameters:
|
||||
level: 2
|
||||
|
||||
checkFunctionNameCase: false
|
||||
checkInternalClassCaseSensitivity: false
|
||||
checkFunctionNameCase: true
|
||||
checkInternalClassCaseSensitivity: true
|
||||
treatPhpDocTypesAsCertain: false
|
||||
|
||||
paths:
|
||||
|
Loading…
x
Reference in New Issue
Block a user