@@ -40,45 +40,42 @@ public function getStatusDataRows()
40
40
$ value = 'true ' ;
41
41
}
42
42
if ($ k === 'used_memory ' || $ k === 'free_memory ' || $ k === 'wasted_memory ' ) {
43
- $ v = $ this ->_size_for_humans (
43
+ $ value = $ this ->_size_for_humans (
44
44
$ v
45
45
);
46
- }
47
- if ($ k === 'current_wasted_percentage ' || $ k === 'opcache_hit_rate ' ) {
48
- $ v = number_format (
46
+ } elseif ($ k === 'current_wasted_percentage ' || $ k === 'opcache_hit_rate ' ) {
47
+ $ value = number_format (
49
48
$ v ,
50
49
2
51
50
) . '% ' ;
51
+ } elseif ($ k === 'blacklist_miss_ratio ' ) {
52
+ $ value = number_format ($ v , 2 ) . '% ' ;
53
+ } elseif ($ k === 'start_time ' || $ k === 'last_restart_time ' ) {
54
+ $ value = ($ v ? date (DATE_RFC822 , $ v ) : 'never ' );
52
55
}
53
- if ($ k === 'blacklist_miss_ratio ' ) {
54
- $ v = number_format ($ v , 2 ) . '% ' ;
55
- }
56
- if ($ k === 'start_time ' || $ k === 'last_restart_time ' ) {
57
- $ v = ($ v ? date (DATE_RFC822 , $ v ) : 'never ' );
58
- }
56
+
59
57
if (THOUSAND_SEPARATOR === true && is_int ($ v )) {
60
- $ v = number_format ($ v );
58
+ $ value = number_format ($ v );
61
59
}
62
60
63
- $ rows [] = "<tr><th> $ k</th><td> $ v </td></tr> \n" ;
61
+ $ rows [] = "<tr><th> $ k</th><td> $ value </td></tr> \n" ;
64
62
}
65
- continue ;
66
- }
67
- if ($ value === false ) {
68
- $ value = 'false ' ;
69
- }
70
- if ($ value === true ) {
71
- $ value = 'true ' ;
63
+ } else {
64
+ if ($ value === false ) {
65
+ $ value = 'false ' ;
66
+ }
67
+ if ($ value === true ) {
68
+ $ value = 'true ' ;
69
+ }
70
+ $ rows [] = "<tr><th> $ key</th><td> $ value</td></tr> \n" ;
72
71
}
73
- $ rows [] = "<tr><th> $ key</th><td> $ value</td></tr> \n" ;
74
72
}
75
73
76
74
return implode ("\n" , $ rows );
77
75
}
78
76
79
- public function getConfigDataRows ()
77
+ public function getSettings ()
80
78
{
81
- $ rows = array ();
82
79
foreach ($ this ->configuration ['directives ' ] as $ key => $ value ) {
83
80
if ($ value === false ) {
84
81
$ value = 'false ' ;
@@ -89,10 +86,8 @@ public function getConfigDataRows()
89
86
if ($ key == 'opcache.memory_consumption ' ) {
90
87
$ value = $ this ->_size_for_humans ($ value );
91
88
}
92
- $ rows [] = " <tr><th> $ key</th><td> $ value</td></tr> \n" ;
89
+ yield [ " config " => $ key, " value " => $ value] ;
93
90
}
94
-
95
- return implode ("\n" , $ rows );
96
91
}
97
92
98
93
public function getScriptStatusRows ()
0 commit comments