PowerState
last analyzed

Complexity

Total Complexity 0

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 0
eloc 14
c 1
b 0
f 0
dl 0
loc 18
1
<?php
2
/**
3
 * PowerState.php
4
 *
5
 *
6
 * This program is free software: you can redistribute it and/or modify
7
 * it under the terms of the GNU General Public License as published by
8
 * the Free Software Foundation, either version 3 of the License, or
9
 * (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
18
 */
19
20
namespace LibreNMS\Enum;
21
22
abstract class PowerState
23
{
24
    const OFF = 0;
25
    const ON = 1;
26
    const SUSPENDED = 2;
27
    const UNKNOWN = 3;
28
29
    const STATES = [
30
        'powered off' => self::OFF,
31
        'poweredoff' => self::OFF,
32
        'shut off' => self::OFF,
33
34
        'powered on' => self::ON,
35
        'poweredon' => self::ON,
36
        'running' => self::ON,
37
38
        'suspended' => self::SUSPENDED,
39
        'paused' => self::SUSPENDED,
40
    ];
41
}
42