Fix const visibility
This commit is contained in:
parent
00985429c5
commit
ce64888b81
|
@ -25,7 +25,7 @@ class SyncPropertyForm extends DirectorObjectForm
|
|||
|
||||
private $dummyObject;
|
||||
|
||||
const EXPRESSION = '__EXPRESSION__';
|
||||
public const EXPRESSION = '__EXPRESSION__';
|
||||
|
||||
/**
|
||||
* @throws \Zend_Form_Exception
|
||||
|
|
|
@ -13,5 +13,5 @@ class Restriction
|
|||
public const SCHEDULED_DOWNTIME_APPLY_FILTER_BY_NAME = 'director/scheduled-downtime/apply/filter-by-name';
|
||||
public const SERVICE_APPLY_FILTER_BY_NAME = 'director/service/apply/filter-by-name';
|
||||
public const SERVICE_SET_FILTER_BY_NAME = 'director/service_set/filter-by-name';
|
||||
const DB_RESOURCE = 'director/db_resource';
|
||||
public const DB_RESOURCE = 'director/db_resource';
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ use Icinga\Exception\ProgrammingError;
|
|||
class CustomVariableNumber extends CustomVariable
|
||||
{
|
||||
// Hint: 'F' is intentional, this MUST NOT respect locales
|
||||
const PRECISION = '%.9F';
|
||||
public const PRECISION = '%.9F';
|
||||
|
||||
public function equals(CustomVariable $var)
|
||||
{
|
||||
|
|
|
@ -12,7 +12,7 @@ use Zend_Db_Select as ZfDbSelect;
|
|||
|
||||
class IcingaObjectQuery
|
||||
{
|
||||
const BASE_ALIAS = 'o';
|
||||
public const BASE_ALIAS = 'o';
|
||||
|
||||
/** @var Db */
|
||||
protected $connection;
|
||||
|
|
|
@ -16,10 +16,10 @@ class ServiceSetQueryBuilder
|
|||
{
|
||||
use TableWithBranchSupport;
|
||||
|
||||
const TABLE = BranchSupport::TABLE_ICINGA_SERVICE;
|
||||
const BRANCHED_TABLE = BranchSupport::BRANCHED_TABLE_ICINGA_SERVICE;
|
||||
const SET_TABLE = BranchSupport::TABLE_ICINGA_SERVICE_SET;
|
||||
const BRANCHED_SET_TABLE = BranchSupport::BRANCHED_TABLE_ICINGA_SERVICE_SET;
|
||||
public const TABLE = BranchSupport::TABLE_ICINGA_SERVICE;
|
||||
public const BRANCHED_TABLE = BranchSupport::BRANCHED_TABLE_ICINGA_SERVICE;
|
||||
public const SET_TABLE = BranchSupport::TABLE_ICINGA_SERVICE_SET;
|
||||
public const BRANCHED_SET_TABLE = BranchSupport::BRANCHED_TABLE_ICINGA_SERVICE_SET;
|
||||
|
||||
/** @var Db */
|
||||
protected $connection;
|
||||
|
|
|
@ -10,7 +10,7 @@ use function json_last_error;
|
|||
|
||||
class Json
|
||||
{
|
||||
const DEFAULT_FLAGS = JSON_PRESERVE_ZERO_FRACTION | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE;
|
||||
public const DEFAULT_FLAGS = JSON_PRESERVE_ZERO_FRACTION | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE;
|
||||
|
||||
/**
|
||||
* Encode with well-known flags, as we require the result to be reproducible
|
||||
|
|
|
@ -18,7 +18,7 @@ use stdClass;
|
|||
*/
|
||||
class Branch
|
||||
{
|
||||
const PREFIX_SYNC_PREVIEW = '/syncpreview';
|
||||
public const PREFIX_SYNC_PREVIEW = '/syncpreview';
|
||||
|
||||
/** @var UuidInterface|null */
|
||||
protected $branchUuid;
|
||||
|
|
|
@ -18,11 +18,11 @@ use RuntimeException;
|
|||
|
||||
class BranchActivity
|
||||
{
|
||||
const DB_TABLE = 'director_branch_activity';
|
||||
public const DB_TABLE = 'director_branch_activity';
|
||||
|
||||
const ACTION_CREATE = DirectorActivityLog::ACTION_CREATE;
|
||||
const ACTION_MODIFY = DirectorActivityLog::ACTION_MODIFY;
|
||||
const ACTION_DELETE = DirectorActivityLog::ACTION_DELETE;
|
||||
public const ACTION_CREATE = DirectorActivityLog::ACTION_CREATE;
|
||||
public const ACTION_MODIFY = DirectorActivityLog::ACTION_MODIFY;
|
||||
public const ACTION_DELETE = DirectorActivityLog::ACTION_DELETE;
|
||||
|
||||
/** @var int */
|
||||
protected $timestampNs;
|
||||
|
|
|
@ -12,11 +12,11 @@ use function in_array;
|
|||
class BranchSettings
|
||||
{
|
||||
// TODO: Ranges is weird. key = scheduled_downtime_id, range_type, range_key
|
||||
const ENCODED_ARRAYS = ['imports', 'groups', 'ranges', 'users', 'usergroups'];
|
||||
public const ENCODED_ARRAYS = ['imports', 'groups', 'ranges', 'users', 'usergroups'];
|
||||
|
||||
const ENCODED_DICTIONARIES = ['vars', 'arguments'];
|
||||
public const ENCODED_DICTIONARIES = ['vars', 'arguments'];
|
||||
|
||||
const BRANCH_SPECIFIC_PROPERTIES = [
|
||||
public const BRANCH_SPECIFIC_PROPERTIES = [
|
||||
'uuid',
|
||||
'branch_uuid',
|
||||
'branch_created',
|
||||
|
@ -24,12 +24,12 @@ class BranchSettings
|
|||
'set_null',
|
||||
];
|
||||
|
||||
const BRANCH_BOOLEANS = [
|
||||
public const BRANCH_BOOLEANS = [
|
||||
'branch_created',
|
||||
'branch_deleted',
|
||||
];
|
||||
|
||||
const RELATED_SETS = [
|
||||
public const RELATED_SETS = [
|
||||
'types',
|
||||
'states',
|
||||
];
|
||||
|
|
|
@ -9,8 +9,8 @@ use Ramsey\Uuid\UuidInterface;
|
|||
|
||||
class BranchStore
|
||||
{
|
||||
const TABLE = 'director_branch';
|
||||
const TABLE_ACTIVITY = 'director_branch_activity';
|
||||
public const TABLE = 'director_branch';
|
||||
public const TABLE_ACTIVITY = 'director_branch_activity';
|
||||
|
||||
protected $connection;
|
||||
|
||||
|
|
|
@ -7,41 +7,42 @@ use Icinga\Module\Director\Objects\SyncRule;
|
|||
|
||||
class BranchSupport
|
||||
{
|
||||
const BRANCHED_TABLE_PREFIX = 'branched_';
|
||||
public const BRANCHED_TABLE_PREFIX = 'branched_';
|
||||
|
||||
const TABLE_ICINGA_APIUSER = 'icinga_apiuser';
|
||||
const TABLE_ICINGA_COMMAND = 'icinga_command';
|
||||
const TABLE_ICINGA_DEPENDENCY = 'icinga_dependency';
|
||||
const TABLE_ICINGA_ENDPOINT = 'icinga_endpoint';
|
||||
const TABLE_ICINGA_HOST = 'icinga_host';
|
||||
const TABLE_ICINGA_HOSTGROUP = 'icinga_hostgroup';
|
||||
const TABLE_ICINGA_NOTIFICATION = 'icinga_notification';
|
||||
const TABLE_ICINGA_SCHEDULED_DOWNTIME = 'icinga_scheduled_downtime';
|
||||
const TABLE_ICINGA_SERVICE = 'icinga_service';
|
||||
const TABLE_ICINGA_SERVICEGROUP = 'icinga_servicegroup';
|
||||
const TABLE_ICINGA_SERVICE_SET = 'icinga_service_set';
|
||||
const TABLE_ICINGA_TIMEPERIOD = 'icinga_timeperiod';
|
||||
const TABLE_ICINGA_USER = 'icinga_user';
|
||||
const TABLE_ICINGA_USERGROUP = 'icinga_usergroup';
|
||||
const TABLE_ICINGA_ZONE = 'icinga_zone';
|
||||
public const TABLE_ICINGA_APIUSER = 'icinga_apiuser';
|
||||
public const TABLE_ICINGA_COMMAND = 'icinga_command';
|
||||
public const TABLE_ICINGA_DEPENDENCY = 'icinga_dependency';
|
||||
public const TABLE_ICINGA_ENDPOINT = 'icinga_endpoint';
|
||||
public const TABLE_ICINGA_HOST = 'icinga_host';
|
||||
public const TABLE_ICINGA_HOSTGROUP = 'icinga_hostgroup';
|
||||
public const TABLE_ICINGA_NOTIFICATION = 'icinga_notification';
|
||||
public const TABLE_ICINGA_SCHEDULED_DOWNTIME = 'icinga_scheduled_downtime';
|
||||
public const TABLE_ICINGA_SERVICE = 'icinga_service';
|
||||
public const TABLE_ICINGA_SERVICEGROUP = 'icinga_servicegroup';
|
||||
public const TABLE_ICINGA_SERVICE_SET = 'icinga_service_set';
|
||||
public const TABLE_ICINGA_TIMEPERIOD = 'icinga_timeperiod';
|
||||
public const TABLE_ICINGA_USER = 'icinga_user';
|
||||
public const TABLE_ICINGA_USERGROUP = 'icinga_usergroup';
|
||||
public const TABLE_ICINGA_ZONE = 'icinga_zone';
|
||||
|
||||
const BRANCHED_TABLE_ICINGA_APIUSER = self::BRANCHED_TABLE_PREFIX . self::TABLE_ICINGA_APIUSER;
|
||||
const BRANCHED_TABLE_ICINGA_COMMAND = self::BRANCHED_TABLE_PREFIX . self::TABLE_ICINGA_COMMAND;
|
||||
const BRANCHED_TABLE_ICINGA_DEPENDENCY = self::BRANCHED_TABLE_PREFIX . self::TABLE_ICINGA_DEPENDENCY;
|
||||
const BRANCHED_TABLE_ICINGA_ENDPOINT = self::BRANCHED_TABLE_PREFIX . self::TABLE_ICINGA_ENDPOINT;
|
||||
const BRANCHED_TABLE_ICINGA_HOST = self::BRANCHED_TABLE_PREFIX . self::TABLE_ICINGA_HOST;
|
||||
const BRANCHED_TABLE_ICINGA_HOSTGROUP = self::BRANCHED_TABLE_PREFIX . self::TABLE_ICINGA_HOSTGROUP;
|
||||
const BRANCHED_TABLE_ICINGA_NOTIFICATION = self::BRANCHED_TABLE_PREFIX . self::TABLE_ICINGA_NOTIFICATION;
|
||||
const BRANCHED_TABLE_ICINGA_SCHEDULED_DOWNTIME = self::BRANCHED_TABLE_PREFIX . self::TABLE_ICINGA_SCHEDULED_DOWNTIME;
|
||||
const BRANCHED_TABLE_ICINGA_SERVICE = self::BRANCHED_TABLE_PREFIX . self::TABLE_ICINGA_SERVICE;
|
||||
const BRANCHED_TABLE_ICINGA_SERVICEGROUP = self::BRANCHED_TABLE_PREFIX . self::TABLE_ICINGA_SERVICEGROUP;
|
||||
const BRANCHED_TABLE_ICINGA_SERVICE_SET = self::BRANCHED_TABLE_PREFIX . self::TABLE_ICINGA_SERVICE_SET;
|
||||
const BRANCHED_TABLE_ICINGA_TIMEPERIOD = self::BRANCHED_TABLE_PREFIX . self::TABLE_ICINGA_TIMEPERIOD;
|
||||
const BRANCHED_TABLE_ICINGA_USER = self::BRANCHED_TABLE_PREFIX . self::TABLE_ICINGA_USER;
|
||||
const BRANCHED_TABLE_ICINGA_USERGROUP = self::BRANCHED_TABLE_PREFIX . self::TABLE_ICINGA_USERGROUP;
|
||||
const BRANCHED_TABLE_ICINGA_ZONE = self::BRANCHED_TABLE_PREFIX . self::TABLE_ICINGA_ZONE;
|
||||
public const BRANCHED_TABLE_ICINGA_APIUSER = self::BRANCHED_TABLE_PREFIX . self::TABLE_ICINGA_APIUSER;
|
||||
public const BRANCHED_TABLE_ICINGA_COMMAND = self::BRANCHED_TABLE_PREFIX . self::TABLE_ICINGA_COMMAND;
|
||||
public const BRANCHED_TABLE_ICINGA_DEPENDENCY = self::BRANCHED_TABLE_PREFIX . self::TABLE_ICINGA_DEPENDENCY;
|
||||
public const BRANCHED_TABLE_ICINGA_ENDPOINT = self::BRANCHED_TABLE_PREFIX . self::TABLE_ICINGA_ENDPOINT;
|
||||
public const BRANCHED_TABLE_ICINGA_HOST = self::BRANCHED_TABLE_PREFIX . self::TABLE_ICINGA_HOST;
|
||||
public const BRANCHED_TABLE_ICINGA_HOSTGROUP = self::BRANCHED_TABLE_PREFIX . self::TABLE_ICINGA_HOSTGROUP;
|
||||
public const BRANCHED_TABLE_ICINGA_NOTIFICATION = self::BRANCHED_TABLE_PREFIX . self::TABLE_ICINGA_NOTIFICATION;
|
||||
public const BRANCHED_TABLE_ICINGA_SCHEDULED_DOWNTIME =
|
||||
self::BRANCHED_TABLE_PREFIX . self::TABLE_ICINGA_SCHEDULED_DOWNTIME;
|
||||
public const BRANCHED_TABLE_ICINGA_SERVICE = self::BRANCHED_TABLE_PREFIX . self::TABLE_ICINGA_SERVICE;
|
||||
public const BRANCHED_TABLE_ICINGA_SERVICEGROUP = self::BRANCHED_TABLE_PREFIX . self::TABLE_ICINGA_SERVICEGROUP;
|
||||
public const BRANCHED_TABLE_ICINGA_SERVICE_SET = self::BRANCHED_TABLE_PREFIX . self::TABLE_ICINGA_SERVICE_SET;
|
||||
public const BRANCHED_TABLE_ICINGA_TIMEPERIOD = self::BRANCHED_TABLE_PREFIX . self::TABLE_ICINGA_TIMEPERIOD;
|
||||
public const BRANCHED_TABLE_ICINGA_USER = self::BRANCHED_TABLE_PREFIX . self::TABLE_ICINGA_USER;
|
||||
public const BRANCHED_TABLE_ICINGA_USERGROUP = self::BRANCHED_TABLE_PREFIX . self::TABLE_ICINGA_USERGROUP;
|
||||
public const BRANCHED_TABLE_ICINGA_ZONE = self::BRANCHED_TABLE_PREFIX . self::TABLE_ICINGA_ZONE;
|
||||
|
||||
const OBJECT_TABLES = [
|
||||
public const OBJECT_TABLES = [
|
||||
self::TABLE_ICINGA_APIUSER,
|
||||
self::TABLE_ICINGA_COMMAND,
|
||||
self::TABLE_ICINGA_DEPENDENCY,
|
||||
|
@ -59,7 +60,7 @@ class BranchSupport
|
|||
self::TABLE_ICINGA_ZONE,
|
||||
];
|
||||
|
||||
const BRANCHED_TABLES = [
|
||||
public const BRANCHED_TABLES = [
|
||||
self::BRANCHED_TABLE_ICINGA_APIUSER,
|
||||
self::BRANCHED_TABLE_ICINGA_COMMAND,
|
||||
self::BRANCHED_TABLE_ICINGA_DEPENDENCY,
|
||||
|
|
|
@ -11,9 +11,9 @@ use Zend_Db_Select as ZfSelect;
|
|||
|
||||
class IcingaObjectFilterHelper
|
||||
{
|
||||
const INHERIT_DIRECT = 'direct';
|
||||
const INHERIT_INDIRECT = 'indirect';
|
||||
const INHERIT_DIRECT_OR_INDIRECT = 'total';
|
||||
public const INHERIT_DIRECT = 'direct';
|
||||
public const INHERIT_INDIRECT = 'indirect';
|
||||
public const INHERIT_DIRECT_OR_INDIRECT = 'total';
|
||||
|
||||
/**
|
||||
* @param IcingaObject|int|string $id
|
||||
|
|
|
@ -13,9 +13,9 @@ use Icinga\Module\Director\Data\Db\DbObject;
|
|||
*/
|
||||
class Basket extends DbObject implements ExportInterface
|
||||
{
|
||||
const SELECTION_ALL = 'ALL';
|
||||
const SELECTION_NONE = 'IGNORE';
|
||||
const SELECTION_CUSTOM = '[]';
|
||||
public const SELECTION_ALL = 'ALL';
|
||||
public const SELECTION_NONE = 'IGNORE';
|
||||
public const SELECTION_CUSTOM = '[]';
|
||||
|
||||
protected $table = 'director_basket';
|
||||
|
||||
|
|
|
@ -11,12 +11,12 @@ use stdClass;
|
|||
|
||||
class DirectorActivityLog extends DbObject
|
||||
{
|
||||
const ACTION_CREATE = 'create';
|
||||
const ACTION_DELETE = 'delete';
|
||||
const ACTION_MODIFY = 'modify';
|
||||
public const ACTION_CREATE = 'create';
|
||||
public const ACTION_DELETE = 'delete';
|
||||
public const ACTION_MODIFY = 'modify';
|
||||
|
||||
/** @deprecated */
|
||||
const AUDIT_REMOVE = 'remove';
|
||||
public const AUDIT_REMOVE = 'remove';
|
||||
|
||||
protected $table = 'director_activity_log';
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ use Iterator;
|
|||
|
||||
class IcingaArguments implements Iterator, Countable, IcingaConfigRenderer
|
||||
{
|
||||
const COMMENT_DSL_UNSUPPORTED = '/* Icinga 2 does not export DSL function bodies via API */';
|
||||
public const COMMENT_DSL_UNSUPPORTED = '/* Icinga 2 does not export DSL function bodies via API */';
|
||||
|
||||
/** @var IcingaCommandArgument[] */
|
||||
protected $storedArguments = [];
|
||||
|
|
|
@ -26,8 +26,8 @@ use RuntimeException;
|
|||
|
||||
abstract class IcingaObject extends DbObject implements IcingaConfigRenderer
|
||||
{
|
||||
const RESOLVE_ERROR = '(unable to resolve)';
|
||||
const ALL_NON_GLOBAL_ZONES = '(all non-global zones)';
|
||||
public const RESOLVE_ERROR = '(unable to resolve)';
|
||||
public const ALL_NON_GLOBAL_ZONES = '(all non-global zones)';
|
||||
|
||||
protected $keyName = 'object_name';
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ namespace Icinga\Module\Director;
|
|||
|
||||
class PlainObjectRenderer
|
||||
{
|
||||
const INDENTATION = ' ';
|
||||
public const INDENTATION = ' ';
|
||||
|
||||
public static function render($object)
|
||||
{
|
||||
|
|
|
@ -8,7 +8,7 @@ use InvalidArgumentException;
|
|||
|
||||
class PropertyModifierTrim extends PropertyModifierHook
|
||||
{
|
||||
const VALID_METHODS = ['trim', 'ltrim', 'rtrim'];
|
||||
public const VALID_METHODS = ['trim', 'ltrim', 'rtrim'];
|
||||
|
||||
public static function addSettingsFormFields(QuickForm $form)
|
||||
{
|
||||
|
|
|
@ -26,16 +26,16 @@ use Zend_Form_Element_Select as ZfSelect;
|
|||
|
||||
abstract class DirectorObjectForm extends DirectorForm
|
||||
{
|
||||
const GROUP_ORDER_OBJECT_DEFINITION = 20;
|
||||
const GROUP_ORDER_RELATED_OBJECTS = 25;
|
||||
const GROUP_ORDER_ASSIGN = 30;
|
||||
const GROUP_ORDER_CHECK_EXECUTION = 40;
|
||||
const GROUP_ORDER_CUSTOM_FIELDS = 50;
|
||||
const GROUP_ORDER_CUSTOM_FIELD_CATEGORIES = 60;
|
||||
const GROUP_ORDER_EVENT_FILTERS = 700;
|
||||
const GROUP_ORDER_EXTRA_INFO = 750;
|
||||
const GROUP_ORDER_CLUSTERING = 800;
|
||||
const GROUP_ORDER_BUTTONS = 1000;
|
||||
public const GROUP_ORDER_OBJECT_DEFINITION = 20;
|
||||
public const GROUP_ORDER_RELATED_OBJECTS = 25;
|
||||
public const GROUP_ORDER_ASSIGN = 30;
|
||||
public const GROUP_ORDER_CHECK_EXECUTION = 40;
|
||||
public const GROUP_ORDER_CUSTOM_FIELDS = 50;
|
||||
public const GROUP_ORDER_CUSTOM_FIELD_CATEGORIES = 60;
|
||||
public const GROUP_ORDER_EVENT_FILTERS = 700;
|
||||
public const GROUP_ORDER_EXTRA_INFO = 750;
|
||||
public const GROUP_ORDER_CLUSTERING = 800;
|
||||
public const GROUP_ORDER_BUTTONS = 1000;
|
||||
|
||||
/** @var IcingaObject */
|
||||
protected $object;
|
||||
|
|
|
@ -31,7 +31,7 @@ use Zend_Form_Element_Text as ZfText;
|
|||
*/
|
||||
class StoredPassword extends ZfText
|
||||
{
|
||||
const UNCHANGED = '__UNCHANGED_VALUE__';
|
||||
public const UNCHANGED = '__UNCHANGED_VALUE__';
|
||||
|
||||
public $helper = 'formStoredPassword';
|
||||
|
||||
|
|
|
@ -16,9 +16,9 @@ use RuntimeException;
|
|||
*/
|
||||
abstract class QuickForm extends QuickBaseForm
|
||||
{
|
||||
const ID = '__FORM_NAME';
|
||||
public const ID = '__FORM_NAME';
|
||||
|
||||
const CSRF = '__FORM_CSRF';
|
||||
public const CSRF = '__FORM_CSRF';
|
||||
|
||||
/**
|
||||
* The name of this form
|
||||
|
|
|
@ -8,7 +8,7 @@ use Zend_Validate_Abstract;
|
|||
|
||||
class IsDataListEntry extends Zend_Validate_Abstract
|
||||
{
|
||||
const INVALID = 'intInvalid';
|
||||
public const INVALID = 'intInvalid';
|
||||
|
||||
/** @var Db */
|
||||
private $db;
|
||||
|
|
|
@ -7,7 +7,7 @@ use Zend_Validate_Abstract;
|
|||
|
||||
class NamePattern extends Zend_Validate_Abstract
|
||||
{
|
||||
const INVALID = 'intInvalid';
|
||||
public const INVALID = 'intInvalid';
|
||||
|
||||
private $filter;
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ class SyncRunDetails extends NameValueTable
|
|||
{
|
||||
use TranslationHelper;
|
||||
|
||||
const URL_ACTIVITIES = 'director/config/activities';
|
||||
public const URL_ACTIVITIES = 'director/config/activities';
|
||||
|
||||
/** @var SyncRun */
|
||||
protected $run;
|
||||
|
|
|
@ -12,8 +12,8 @@ use Icinga\Module\Director\Test\BaseTestCase;
|
|||
|
||||
class HostGroupMembershipResolverTest extends BaseTestCase
|
||||
{
|
||||
const PREFIX = '__groupmembership';
|
||||
const TYPE = 'host';
|
||||
public const PREFIX = '__groupmembership';
|
||||
public const TYPE = 'host';
|
||||
|
||||
public function setUp(): void
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue