Index: trunk/tools/code-utils/stylize.php |
— | — | @@ -4,7 +4,7 @@ |
5 | 5 | * A PHP code beautifier aimed at adding lots of spaces to files that lack them, |
6 | 6 | * in keeping with MediaWiki's spacey site style. |
7 | 7 | * |
8 | | - * @author tstarling |
| 8 | + * @author Tim Starling |
9 | 9 | * @author Jeroen De Dauw |
10 | 10 | */ |
11 | 11 | |
— | — | @@ -19,7 +19,7 @@ |
20 | 20 | if ( count( $argv ) ) { |
21 | 21 | foreach ( $argv as $dirOrFile ) { |
22 | 22 | if ( is_dir( $dirOrFile ) ) { |
23 | | - stylize_recursivly( $dirOrFile ); |
| 23 | + stylize_recursively( $dirOrFile ); |
24 | 24 | } else { |
25 | 25 | stylize_file( $dirOrFile ); |
26 | 26 | } |
— | — | @@ -28,10 +28,10 @@ |
29 | 29 | stylize_file( '-' ); |
30 | 30 | } |
31 | 31 | |
32 | | -function stylize_recursivly( $dir ) { |
| 32 | +function stylize_recursively( $dir ) { |
33 | 33 | foreach ( glob( "$dir/*" ) as $dirOrFile ) { |
34 | 34 | if ( is_dir( $dirOrFile ) ) { // It's a directory, so call this function again. |
35 | | - stylize_recursivly( $dirOrFile ); |
| 35 | + stylize_recursively( $dirOrFile ); |
36 | 36 | } elseif ( is_file( $dirOrFile ) ) { // It's a file, so let's stylize it. |
37 | 37 | // Only stylize php and js files, omitting minified js files. |
38 | 38 | if ( preg_match( '/\.(php|php5|js)$/', $dirOrFile ) && !preg_match( '/\.(min\.js)$/', $dirOrFile ) ) { |
— | — | @@ -58,7 +58,8 @@ |
59 | 59 | } |
60 | 60 | $stylizer = new Stylizer( $s ); |
61 | 61 | $s = $stylizer->stylize(); |
62 | | - if ( $backup ) rename( $filename, "$filename~" ); |
| 62 | + if ( $backup ) |
| 63 | + rename( $filename, "$filename~" ); |
63 | 64 | file_put_contents( $filename, $s ); |
64 | 65 | } |
65 | 66 | } |
Index: trunk/tools/code-utils/lint.php |
— | — | @@ -34,7 +34,7 @@ |
35 | 35 | } |
36 | 36 | if ( is_dir( "$dir/$fileName" ) ) { |
37 | 37 | $ret = check_dir( "$dir/$fileName" ); |
38 | | - } elseif ( substr( $fileName, - 4 ) == '.php' ) { |
| 38 | + } elseif ( substr( $fileName, -4 ) == '.php' ) { |
39 | 39 | $ret = check_file( "$dir/$fileName" ); |
40 | 40 | } else { |
41 | 41 | $ret = true; |