diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2020-02-03 13:41:45 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-02-03 13:42:08 +0100 |
commit | 169805777c17892865ae462ae0a0895344a7fd3c (patch) | |
tree | 715ab54d18d387e0f2fec607a97462af525f2556 /scripts/dev/find_tested.php | |
parent | 6b38251820be4ab2eb38c55d41c6680d0bff83f3 (diff) | |
parent | 58b17906f512866c2e34844fa497ecdf7f1e1e3d (diff) | |
download | php-git-169805777c17892865ae462ae0a0895344a7fd3c.tar.gz |
Merge branch 'PHP-7.4'
* PHP-7.4:
Apply tidy formatting
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]; } |