Index: trunk/phase3/maintenance/mcc.php |
— | — | @@ -31,10 +31,7 @@ |
32 | 32 | $command = 'fullhelp'; |
33 | 33 | } |
34 | 34 | if ( $command === 'fullhelp' ) { |
35 | | - $max_cmd_len = 0; |
36 | | - foreach( array_keys( $commandList ) as $cmd ) { |
37 | | - $max_cmd_len = max( $max_cmd_len, strlen($cmd) ); |
38 | | - } |
| 35 | + $max_cmd_len = max( array_map( 'strlen', array_keys( $commandList ) ) ); |
39 | 36 | foreach ( $commandList as $cmd => $desc ) { |
40 | 37 | printf( "%-{$max_cmd_len}s: %s\n", $cmd, $desc ); |
41 | 38 | } |