HealthCheck::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 5
rs 10
cc 1
nc 1
nop 3
1
<?php
2
namespace Health;
3
4
class HealthCheck
5
{
6
7
    const STATE_UP = 'UP';
8
9
    const STATE_DOWN = 'DOWN';
10
11
    /**
12
     * Name
13
     *
14
     * @var string
15
     */
16
    private $name = '';
17
18
    /**
19
     * State
20
     *
21
     * @var string
22
     */
23
    private $state = '';
24
25
    /**
26
     * Extra data
27
     *
28
     * @var array
29
     */
30
    private $data = [];
31
32
    /**
33
     *
34
     * @param string $name
35
     * @param string $state
36
     * @param array $data
37
     */
38
    public function __construct($name, $state, $data)
39
    {
40
        $this->name = $name;
41
        $this->state = $state;
42
        $this->data = $data;
43
    }
44
45
    /**
46
     *
47
     * @return string
48
     */
49
    public function getName()
50
    {
51
        return $this->name;
52
    }
53
54
    /**
55
     *
56
     * @return string
57
     */
58
    public function getState()
59
    {
60
        return $this->state;
61
    }
62
63
    /**
64
     *
65
     * @return array
66
     */
67
    public function getData()
68
    {
69
        return $this->data;
70
    }
71
}
72