diff options
Diffstat (limited to 'scripts/dev/find_tested.php')
-rwxr-xr-x | scripts/dev/find_tested.php | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/scripts/dev/find_tested.php b/scripts/dev/find_tested.php index 9368ad3796..3b18879d2f 100755 --- a/scripts/dev/find_tested.php +++ b/scripts/dev/find_tested.php @@ -201,27 +201,27 @@ function get_phpt_files($dir, &$phpt_file_count, &$all_phpt) * Extract tests from a specified file, returns an array of tested function tokens */ function extract_tests($file) { - $code = file_get_contents($file); + $code = file_get_contents($file); - if (!preg_match('/--FILE--\s*(.*)\s*--(EXPECTF|EXPECTREGEX|EXPECT)?--/is', $code, $r)) { - //print "Unable to get code in ".$file."\n"; - return array(); - } + if (!preg_match('/--FILE--\s*(.*)\s*--(EXPECTF|EXPECTREGEX|EXPECT)?--/is', $code, $r)) { + //print "Unable to get code in ".$file."\n"; + return array(); + } - $tokens = token_get_all($r[1]); - $functions = array_filter($tokens, 'filter_functions'); - $functions = array_map( 'map_token_value',$functions); - $functions = array_unique($functions); + $tokens = token_get_all($r[1]); + $functions = array_filter($tokens, 'filter_functions'); + $functions = array_map( 'map_token_value',$functions); + $functions = array_unique($functions); - return $functions; + return $functions; } function filter_functions($x) { - return $x[0] == 307; + return $x[0] == 307; } function map_token_value($x) { - return $x[1]; + return $x[1]; } |