Index: trunk/tools/code-utils/find-long-functions.php |
— | — | @@ -65,7 +65,7 @@ |
66 | 66 | switch( $token[0] ) { |
67 | 67 | case T_CURLY_OPEN: |
68 | 68 | $state['depth']++; |
69 | | - break; |
| 69 | + break; |
70 | 70 | case T_CLASS: |
71 | 71 | case T_FUNCTION: |
72 | 72 | # find the token giving function or class name |
Index: trunk/tools/code-utils/find-entries.php |
— | — | @@ -47,15 +47,15 @@ |
48 | 48 | } |
49 | 49 | |
50 | 50 | if ( ( $tokens[$i][0] == T_STRING ) && $tokens[$i][1] == 'dirname' ) { |
51 | | - do { $i++; } while ( $tokens[$i][0] == T_WHITESPACE ); |
| 51 | + do { $i++; } while ( $tokens[$i][0] == T_WHITESPACE ); |
52 | 52 | if ( $tokens[$i] != '(' ) return false; |
53 | | - do { $i++; } while ( $tokens[$i][0] == T_WHITESPACE ); |
| 53 | + do { $i++; } while ( $tokens[$i][0] == T_WHITESPACE ); |
54 | 54 | if ( $tokens[$i][0] != T_FILE ) return false; |
55 | | - do { $i++; } while ( $tokens[$i][0] == T_WHITESPACE ); |
| 55 | + do { $i++; } while ( $tokens[$i][0] == T_WHITESPACE ); |
56 | 56 | if ( $tokens[$i] != ')' ) return false; |
57 | | - do { $i++; } while ( $tokens[$i][0] == T_WHITESPACE ); |
| 57 | + do { $i++; } while ( $tokens[$i][0] == T_WHITESPACE ); |
58 | 58 | if ( $tokens[$i] != '.' ) return false; |
59 | | - do { $i++; } while ( $tokens[$i][0] == T_WHITESPACE ); |
| 59 | + do { $i++; } while ( $tokens[$i][0] == T_WHITESPACE ); |
60 | 60 | } |
61 | 61 | |
62 | 62 | $filetoken = $tokens[$i]; |
— | — | @@ -95,8 +95,9 @@ |
96 | 96 | $whitelistedFunctions = array( 'define', 'defined', 'dirname', 'function_exists', 'class_exists', 'php_sapi_name', 'version_compare' ); |
97 | 97 | |
98 | 98 | $rpath = realpath( $file ); |
99 | | - if ( isset( $evaluatedFiles[$rpath] ) ) |
| 99 | + if ( isset( $evaluatedFiles[$rpath] ) ) { |
100 | 100 | return $evaluatedFiles[$rpath]; |
| 101 | + } |
101 | 102 | $evaluatedFiles[$rpath] = true; |
102 | 103 | |
103 | 104 | $braces = 0; |
— | — | @@ -170,7 +171,9 @@ |
171 | 172 | } elseif ( in_array( $tokens[$i][0], array( T_ECHO, T_PRINT ) ) ) { |
172 | 173 | if ( $inDefinedConditional ) { |
173 | 174 | /* Allow the echo if this file dies inside this if*/ |
174 | | - if (! $mustDieOnThisSection ) $mustDieOnThisSection = "$file uses {$tokens[$i][1]} in line {$tokens[$i][2]}"; |
| 175 | + if ( !$mustDieOnThisSection ) { |
| 176 | + $mustDieOnThisSection = "$file uses {$tokens[$i][1]} in line {$tokens[$i][2]}"; |
| 177 | + } |
175 | 178 | } else { |
176 | 179 | debug( "$file uses {$tokens[$i][1]} in line {$tokens[$i][2]}" ); |
177 | 180 | return true; |
— | — | @@ -194,7 +197,9 @@ |
195 | 198 | } elseif ( $tokens[$i][0] == T_INLINE_HTML ) { |
196 | 199 | if ( $inDefinedConditional ) { |
197 | 200 | /* Allow the echo if this file dies inside this if*/ |
198 | | - if (! $mustDieOnThisSection ) $mustDieOnThisSection = "$file outputs html in line {$tokens[$i][2]}"; |
| 201 | + if ( !$mustDieOnThisSection ) { |
| 202 | + $mustDieOnThisSection = "$file outputs html in line {$tokens[$i][2]}"; |
| 203 | + } |
199 | 204 | } else { |
200 | 205 | debug( "$file outputs html in line {$tokens[$i][2]}" ); |
201 | 206 | return true; |