Total Complexity | 21 |
Total Lines | 124 |
Duplicated Lines | 0 % |
Coverage | 72.09% |
Changes | 0 |
1 | <?php |
||
5 | class LogMessage { |
||
6 | |||
7 | private $message; |
||
8 | private $context; |
||
9 | private $part; |
||
10 | private $level; |
||
11 | private $extra; |
||
12 | private $datetime; |
||
13 | private $count=1; |
||
14 | |||
15 | 2 | public function __construct($message="",$context="",$part="",$level=0,$datetime=null,$extra=null){ |
|
22 | } |
||
23 | /** |
||
24 | * @return mixed |
||
25 | */ |
||
26 | 2 | public function getMessage() { |
|
27 | 2 | return $this->message; |
|
28 | } |
||
29 | |||
30 | /** |
||
31 | * @return mixed |
||
32 | */ |
||
33 | 2 | public function getContext() { |
|
34 | 2 | return $this->context; |
|
35 | } |
||
36 | |||
37 | /** |
||
38 | * @return mixed |
||
39 | */ |
||
40 | 1 | public function getPart() { |
|
41 | 1 | return $this->part; |
|
42 | } |
||
43 | |||
44 | /** |
||
45 | * @return mixed |
||
46 | */ |
||
47 | 2 | public function getLevel() { |
|
48 | 2 | return $this->level; |
|
49 | } |
||
50 | |||
51 | /** |
||
52 | * @return mixed |
||
53 | */ |
||
54 | 1 | public function getExtra() { |
|
55 | 1 | return $this->extra; |
|
56 | } |
||
57 | |||
58 | /** |
||
59 | * @return mixed |
||
60 | */ |
||
61 | 1 | public function getDatetime() { |
|
62 | 1 | return $this->datetime; |
|
63 | } |
||
64 | |||
65 | /** |
||
66 | * @param mixed $message |
||
67 | */ |
||
68 | public function setMessage($message) { |
||
69 | $this->message = $message; |
||
70 | } |
||
71 | |||
72 | /** |
||
73 | * @param mixed $context |
||
74 | */ |
||
75 | public function setContext($context) { |
||
77 | } |
||
78 | |||
79 | /** |
||
80 | * @param mixed $part |
||
81 | */ |
||
82 | public function setPart($part) { |
||
83 | $this->part = $part; |
||
84 | } |
||
85 | |||
86 | /** |
||
87 | * @param mixed $level |
||
88 | */ |
||
89 | public function setLevel($level) { |
||
90 | $this->level = $level; |
||
91 | } |
||
92 | |||
93 | /** |
||
94 | * @param mixed $extra |
||
95 | */ |
||
96 | public function setExtra($extra) { |
||
98 | } |
||
99 | |||
100 | /** |
||
101 | * @param mixed $datetime |
||
102 | */ |
||
103 | public function setDatetime($datetime) { |
||
105 | } |
||
106 | |||
107 | 1 | public function incCount(){ |
|
108 | 1 | $this->count++; |
|
109 | } |
||
110 | /** |
||
111 | * @return mixed |
||
112 | */ |
||
113 | 1 | public function getCount() { |
|
114 | 1 | return $this->count; |
|
115 | } |
||
116 | |||
117 | 2 | public function equals(LogMessage $message){ |
|
119 | } |
||
120 | |||
121 | 2 | public static function addMessage(&$messages,LogMessage $newMessage){ |
|
122 | 2 | if(\count($messages)>0){ |
|
123 | 2 | $lastM=end($messages); |
|
129 | } |
||
130 | |||
131 | } |
||
132 | |||
133 |