Skip to content

Commit a21f32e

Browse files
committed
Fix const visibility
1 parent fdc8c90 commit a21f32e

File tree

17 files changed

+68
-68
lines changed

17 files changed

+68
-68
lines changed

library/Icingadb/Command/Instance/ToggleInstanceFeatureCommand.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,32 +14,32 @@ class ToggleInstanceFeatureCommand extends IcingaCommand
1414
/**
1515
* Feature for enabling or disabling active host checks on an Icinga instance
1616
*/
17-
const FEATURE_ACTIVE_HOST_CHECKS = 'active_host_checks_enabled';
17+
public const FEATURE_ACTIVE_HOST_CHECKS = 'active_host_checks_enabled';
1818

1919
/**
2020
* Feature for enabling or disabling active service checks on an Icinga instance
2121
*/
22-
const FEATURE_ACTIVE_SERVICE_CHECKS = 'active_service_checks_enabled';
22+
public const FEATURE_ACTIVE_SERVICE_CHECKS = 'active_service_checks_enabled';
2323

2424
/**
2525
* Feature for enabling or disabling host and service event handlers on an Icinga instance
2626
*/
27-
const FEATURE_EVENT_HANDLERS = 'event_handlers_enabled';
27+
public const FEATURE_EVENT_HANDLERS = 'event_handlers_enabled';
2828

2929
/**
3030
* Feature for enabling or disabling host and service flap detection on an Icinga instance
3131
*/
32-
const FEATURE_FLAP_DETECTION = 'flap_detection_enabled';
32+
public const FEATURE_FLAP_DETECTION = 'flap_detection_enabled';
3333

3434
/**
3535
* Feature for enabling or disabling host and service notifications on an Icinga instance
3636
*/
37-
const FEATURE_NOTIFICATIONS = 'notifications_enabled';
37+
public const FEATURE_NOTIFICATIONS = 'notifications_enabled';
3838

3939
/**
4040
* Feature for enabling or disabling the processing of host and service performance data on an Icinga instance
4141
*/
42-
const FEATURE_PERFORMANCE_DATA = 'process_performance_data';
42+
public const FEATURE_PERFORMANCE_DATA = 'process_performance_data';
4343

4444
/**
4545
* Feature that is to be enabled or disabled

library/Icingadb/Command/Object/ProcessCheckResultCommand.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,32 +12,32 @@ class ProcessCheckResultCommand extends ObjectsCommand
1212
/**
1313
* Host up
1414
*/
15-
const HOST_UP = 0;
15+
public const HOST_UP = 0;
1616

1717
/**
1818
* Host down
1919
*/
20-
const HOST_DOWN = 1;
20+
public const HOST_DOWN = 1;
2121

2222
/**
2323
* Service ok
2424
*/
25-
const SERVICE_OK = 0;
25+
public const SERVICE_OK = 0;
2626

2727
/**
2828
* Service warning
2929
*/
30-
const SERVICE_WARNING = 1;
30+
public const SERVICE_WARNING = 1;
3131

3232
/**
3333
* Service critical
3434
*/
35-
const SERVICE_CRITICAL = 2;
35+
public const SERVICE_CRITICAL = 2;
3636

3737
/**
3838
* Service unknown
3939
*/
40-
const SERVICE_UNKNOWN = 3;
40+
public const SERVICE_UNKNOWN = 3;
4141

4242
/**
4343
* Status code of the host or service check result

library/Icingadb/Command/Object/ToggleObjectFeatureCommand.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,31 +12,31 @@ class ToggleObjectFeatureCommand extends ObjectsCommand
1212
/**
1313
* Feature for enabling or disabling active checks of a host or service
1414
*/
15-
const FEATURE_ACTIVE_CHECKS = 'active_checks_enabled';
15+
public const FEATURE_ACTIVE_CHECKS = 'active_checks_enabled';
1616

1717
/**
1818
* Feature for enabling or disabling passive checks of a host or service
1919
*/
20-
const FEATURE_PASSIVE_CHECKS = 'passive_checks_enabled';
20+
public const FEATURE_PASSIVE_CHECKS = 'passive_checks_enabled';
2121

2222
/**
2323
* Feature for enabling or disabling notifications for a host or service
2424
*
2525
* Notifications will be sent out only if notifications are enabled on a program-wide basis as well.
2626
*/
27-
const FEATURE_NOTIFICATIONS = 'notifications_enabled';
27+
public const FEATURE_NOTIFICATIONS = 'notifications_enabled';
2828

2929
/**
3030
* Feature for enabling or disabling event handler for a host or service
3131
*/
32-
const FEATURE_EVENT_HANDLER = 'event_handler_enabled';
32+
public const FEATURE_EVENT_HANDLER = 'event_handler_enabled';
3333

3434
/**
3535
* Feature for enabling or disabling flap detection for a host or service.
3636
*
3737
* In order to enable flap detection flap detection must be enabled on a program-wide basis as well.
3838
*/
39-
const FEATURE_FLAP_DETECTION = 'flapping_enabled';
39+
public const FEATURE_FLAP_DETECTION = 'flapping_enabled';
4040

4141
/**
4242
* Feature that is to be enabled or disabled

library/Icingadb/Command/Transport/ApiCommandTransport.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class ApiCommandTransport implements CommandTransportInterface
2525
/**
2626
* Transport identifier
2727
*/
28-
const TRANSPORT = 'api';
28+
public const TRANSPORT = 'api';
2929

3030
/**
3131
* API host

library/Icingadb/Common/HostStates.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
*/
1010
class HostStates
1111
{
12-
const UP = 0;
12+
public const UP = 0;
1313

14-
const DOWN = 1;
14+
public const DOWN = 1;
1515

16-
const PENDING = 99;
16+
public const PENDING = 99;
1717

1818
/**
1919
* Get the integer value of the given textual host state

library/Icingadb/Common/Icons.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,27 @@
66

77
class Icons
88
{
9-
const COMMENT = 'comment';
9+
public const COMMENT = 'comment';
1010

11-
const HOST_DOWN = 'sitemap';
11+
public const HOST_DOWN = 'sitemap';
1212

13-
const UNREACHABLE = 'sitemap';
13+
public const UNREACHABLE = 'sitemap';
1414

15-
const IN_DOWNTIME = 'plug';
15+
public const IN_DOWNTIME = 'plug';
1616

17-
const IS_ACKNOWLEDGED = 'check';
17+
public const IS_ACKNOWLEDGED = 'check';
1818

19-
const IS_FLAPPING = 'bolt';
19+
public const IS_FLAPPING = 'bolt';
2020

21-
const IS_PERSISTENT = 'thumbtack';
21+
public const IS_PERSISTENT = 'thumbtack';
2222

23-
const NOTIFICATION = 'bell';
23+
public const NOTIFICATION = 'bell';
2424

25-
const REMOVE = 'trash';
25+
public const REMOVE = 'trash';
2626

27-
const USER = 'user';
27+
public const USER = 'user';
2828

29-
const USERGROUP = 'users';
29+
public const USERGROUP = 'users';
3030

31-
const WARNING = 'exclamation-triangle';
31+
public const WARNING = 'exclamation-triangle';
3232
}

library/Icingadb/Common/ServiceStates.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@
99
*/
1010
class ServiceStates
1111
{
12-
const OK = 0;
12+
public const OK = 0;
1313

14-
const WARNING = 1;
14+
public const WARNING = 1;
1515

16-
const CRITICAL = 2;
16+
public const CRITICAL = 2;
1717

18-
const UNKNOWN = 3;
18+
public const UNKNOWN = 3;
1919

20-
const PENDING = 99;
20+
public const PENDING = 99;
2121

2222
/**
2323
* Get the integer value of the given textual service state

library/Icingadb/Compat/UrlMigrator.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212

1313
class UrlMigrator
1414
{
15-
const NO_YES = ['n', 'y'];
16-
const USE_EXPR = 'use-expr';
17-
const SORT_ONLY = 'sort-only';
18-
const LOWER_EXPR = 'lower-expr';
19-
const DROP = 'drop';
15+
public const NO_YES = ['n', 'y'];
16+
public const USE_EXPR = 'use-expr';
17+
public const SORT_ONLY = 'sort-only';
18+
public const LOWER_EXPR = 'lower-expr';
19+
public const DROP = 'drop';
2020

21-
const SUPPORTED_PATHS = [
21+
public const SUPPORTED_PATHS = [
2222
'monitoring/list/hosts' => ['hosts', 'icingadb/hosts'],
2323
'monitoring/hosts/show' => ['multipleHosts', 'icingadb/hosts/details'],
2424
'monitoring/host/show' => ['host', 'icingadb/host'],

library/Icingadb/Data/PivotTable.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
class PivotTable
1414
{
15-
const SORT_ASC = 'asc';
15+
public const SORT_ASC = 'asc';
1616

1717
/**
1818
* The query to fetch as pivot table

library/Icingadb/Hook/ExtensionHook/BaseExtensionHook.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,38 +11,38 @@ abstract class BaseExtensionHook
1111
use HookUtils;
1212

1313
/** @var int Used as default return value for {@see BaseExtensionHook::getLocation()} */
14-
const IDENTIFY_LOCATION_BY_SECTION = -1;
14+
public const IDENTIFY_LOCATION_BY_SECTION = -1;
1515

1616
/** @var string Output section, right at the top */
17-
const OUTPUT_SECTION = 'output';
17+
public const OUTPUT_SECTION = 'output';
1818

1919
/** @var string Graph section, below output */
20-
const GRAPH_SECTION = 'graph';
20+
public const GRAPH_SECTION = 'graph';
2121

2222
/** @var string Detail section, below graphs */
23-
const DETAIL_SECTION = 'detail';
23+
public const DETAIL_SECTION = 'detail';
2424

2525
/** @var string Action section, below action and note urls */
26-
const ACTION_SECTION = 'action';
26+
public const ACTION_SECTION = 'action';
2727

2828
/** @var string Problem section, below comments and downtimes */
29-
const PROBLEM_SECTION = 'problem';
29+
public const PROBLEM_SECTION = 'problem';
3030

3131
/** @var string Related section, below groups and notification recipients */
32-
const RELATED_SECTION = 'related';
32+
public const RELATED_SECTION = 'related';
3333

3434
/** @var string State section, below check statistics and performance data */
35-
const STATE_SECTION = 'state';
35+
public const STATE_SECTION = 'state';
3636

3737
/** @var string Config section, below custom variables and feature toggles */
38-
const CONFIG_SECTION = 'config';
38+
public const CONFIG_SECTION = 'config';
3939

4040
/**
4141
* Base locations for all known sections
4242
*
4343
* @var array<string, int>
4444
*/
45-
const BASE_LOCATIONS = [
45+
public const BASE_LOCATIONS = [
4646
self::OUTPUT_SECTION => 1000,
4747
self::GRAPH_SECTION => 1100,
4848
self::DETAIL_SECTION => 1200,

0 commit comments

Comments
 (0)