@@ -19,8 +19,8 @@ public function testFormatBasicRuleAlert(): void
1919 {
2020 $ details = [
2121 'rule ' => [
22- ['message ' => 'Test alert ' , 'value ' => 10 ]
23- ]
22+ ['message ' => 'Test alert ' , 'value ' => 10 ],
23+ ],
2424 ];
2525
2626 $ output = $ this ->formatter ->format ($ details );
@@ -35,15 +35,15 @@ public function testFormatAlertWithDiff(): void
3535 $ details = [
3636 'diff ' => [
3737 'added ' => [
38- ['message ' => 'New item ' ]
38+ ['message ' => 'New item ' ],
3939 ],
4040 'resolved ' => [
41- ['message ' => 'Fixed item ' ]
42- ]
41+ ['message ' => 'Fixed item ' ],
42+ ],
4343 ],
4444 'rule ' => [
45- ['message ' => 'Still alert ' ]
46- ]
45+ ['message ' => 'Still alert ' ],
46+ ],
4747 ];
4848
4949 $ output = $ this ->formatter ->format ($ details );
@@ -61,9 +61,9 @@ public function testFormatBill(): void
6161 'rule ' => [
6262 [
6363 'bill_id ' => 123 ,
64- 'bill_name ' => 'Test Bill '
65- ]
66- ]
64+ 'bill_name ' => 'Test Bill ' ,
65+ ],
66+ ],
6767 ];
6868
6969 $ output = $ this ->formatter ->format ($ details );
@@ -82,8 +82,8 @@ public function testFormatPort(): void
8282 'device_id ' => 1 ,
8383 'ifDescr ' => 'eth0 ' ,
8484 'ifAlias ' => 'WAN Interface ' ,
85- ]
86- ]
85+ ],
86+ ],
8787 ];
8888
8989 $ output = $ this ->formatter ->format ($ details );
@@ -104,9 +104,9 @@ public function testFormatSensor(): void
104104 'sensor_current ' => 35 ,
105105 'sensor_limit ' => 40 ,
106106 'sensor_limit_warn ' => 38 ,
107- 'sensor_descr ' => 'CPU Temp '
108- ]
109- ]
107+ 'sensor_descr ' => 'CPU Temp ' ,
108+ ],
109+ ],
110110 ];
111111
112112 $ output = $ this ->formatter ->format ($ details );
@@ -128,9 +128,9 @@ public function testFormatSensorState(): void
128128 'sensor_current ' => 2 ,
129129 'state_descr ' => 'Critical ' ,
130130 'state_value ' => 2 , // Used by StateTranslation if constructor receives it
131- 'sensor_descr ' => 'Power State '
132- ]
133- ]
131+ 'sensor_descr ' => 'Power State ' ,
132+ ],
133+ ],
134134 ];
135135
136136 $ output = $ this ->formatter ->format ($ details );
@@ -147,9 +147,9 @@ public function testFormatAccessPoint(): void
147147 [
148148 'accesspoint_id ' => 101 ,
149149 'device_id ' => 1 ,
150- 'name ' => 'AP-01 '
151- ]
152- ]
150+ 'name ' => 'AP-01 ' ,
151+ ],
152+ ],
153153 ];
154154
155155 $ output = $ this ->formatter ->format ($ details );
@@ -170,9 +170,9 @@ public function testFormatService(): void
170170 'service_type ' => 'http ' ,
171171 'service_ip ' => '1.2.3.4 ' ,
172172 'service_desc ' => 'Web Service ' ,
173- 'service_message ' => 'Connection refused '
174- ]
175- ]
173+ 'service_message ' => 'Connection refused ' ,
174+ ],
175+ ],
176176 ];
177177
178178 $ output = $ this ->formatter ->format ($ details );
@@ -195,9 +195,9 @@ public function testFormatBgpPeer(): void
195195 'bgpPeerIdentifier ' => '10.0.0.1 ' ,
196196 'bgpPeerDescr ' => 'ISP-A ' ,
197197 'bgpPeerRemoteAs ' => 65001 ,
198- 'bgpPeerState ' => 'idle '
199- ]
200- ]
198+ 'bgpPeerState ' => 'idle ' ,
199+ ],
200+ ],
201201 ];
202202
203203 $ output = $ this ->formatter ->format ($ details );
@@ -219,9 +219,9 @@ public function testFormatMempool(): void
219219 'mempool_descr ' => 'System RAM ' ,
220220 'mempool_perc ' => 85.5 ,
221221 'mempool_free ' => 1024 * 1024 * 100 , // 100MB
222- 'mempool_total ' => 1024 * 1024 * 1024 // 1GB
223- ]
224- ]
222+ 'mempool_total ' => 1024 * 1024 * 1024 , // 1GB
223+ ],
224+ ],
225225 ];
226226
227227 $ output = $ this ->formatter ->format ($ details );
@@ -244,9 +244,9 @@ public function testFormatApplication(): void
244244 'app_type ' => 'nginx ' ,
245245 'app_status ' => 'up ' ,
246246 'metric ' => 'requests ' ,
247- 'value ' => 5000
248- ]
249- ]
247+ 'value ' => 5000 ,
248+ ],
249+ ],
250250 ];
251251
252252 $ output = $ this ->formatter ->format ($ details );
@@ -267,9 +267,9 @@ public function testFallbackFormatting(): void
267267 'device_id ' => 1 , // should be skipped
268268 'some_id ' => 123 , // should be skipped (contains id)
269269 'description ' => 'test ' , // should be skipped (contains desc)
270- 'another_val ' => 'present '
271- ]
272- ]
270+ 'another_val ' => 'present ' ,
271+ ],
272+ ],
273273 ];
274274
275275 $ output = $ this ->formatter ->format ($ details );
0 commit comments