@@ -40,45 +40,42 @@ public function getStatusDataRows()
4040 $ value = 'true ' ;
4141 }
4242 if ($ k === 'used_memory ' || $ k === 'free_memory ' || $ k === 'wasted_memory ' ) {
43- $ v = $ this ->_size_for_humans (
43+ $ value = $ this ->_size_for_humans (
4444 $ v
4545 );
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 (
4948 $ v ,
5049 2
5150 ) . '% ' ;
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 ' );
5255 }
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+
5957 if (THOUSAND_SEPARATOR === true && is_int ($ v )) {
60- $ v = number_format ($ v );
58+ $ value = number_format ($ v );
6159 }
6260
63- $ rows [] = "<tr><th> $ k</th><td> $ v </td></tr> \n" ;
61+ $ rows [] = "<tr><th> $ k</th><td> $ value </td></tr> \n" ;
6462 }
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" ;
7271 }
73- $ rows [] = "<tr><th> $ key</th><td> $ value</td></tr> \n" ;
7472 }
7573
7674 return implode ("\n" , $ rows );
7775 }
7876
79- public function getConfigDataRows ()
77+ public function getSettings ()
8078 {
81- $ rows = array ();
8279 foreach ($ this ->configuration ['directives ' ] as $ key => $ value ) {
8380 if ($ value === false ) {
8481 $ value = 'false ' ;
@@ -89,10 +86,8 @@ public function getConfigDataRows()
8986 if ($ key == 'opcache.memory_consumption ' ) {
9087 $ value = $ this ->_size_for_humans ($ value );
9188 }
92- $ rows [] = " <tr><th> $ key</th><td> $ value</td></tr> \n" ;
89+ yield [ " config " => $ key, " value " => $ value] ;
9390 }
94-
95- return implode ("\n" , $ rows );
9691 }
9792
9893 public function getScriptStatusRows ()
0 commit comments