summaryrefslogtreecommitdiff
path: root/scripts/dev
diff options
context:
space:
mode:
authorPeter Kokot <peterkokot@gmail.com>2018-10-13 14:17:28 +0200
committerPeter Kokot <peterkokot@gmail.com>2018-10-13 14:17:28 +0200
commit37c329d7153b65fd2430fa42e8af8e8a0cbc0a41 (patch)
tree7041c722228f74286b96c50fc834652f0c29156f /scripts/dev
parent6c2c7dabee006fa735307d92bb223a1fa3d47414 (diff)
downloadphp-git-37c329d7153b65fd2430fa42e8af8e8a0cbc0a41.tar.gz
Trim trailing whitespace in source code files
Diffstat (limited to 'scripts/dev')
-rwxr-xr-xscripts/dev/find_tested.php18
-rwxr-xr-xscripts/dev/gen_verify_stub2
2 files changed, 10 insertions, 10 deletions
diff --git a/scripts/dev/find_tested.php b/scripts/dev/find_tested.php
index 33d53d8163..c2a223b776 100755
--- a/scripts/dev/find_tested.php
+++ b/scripts/dev/find_tested.php
@@ -72,7 +72,7 @@ $extension_method_info = mark_methods_as_tested($extension_method_info, $phpt_fi
/**
* The loop to output the test coverage info
* Should output: Extension, Class Name, Method/Function Name, Test Status, Test Files
- */
+ */
foreach($extension_method_info as $record) {
echo $record[EXTENSION_NAME] . ",";
echo $record[CLASS_NAME] . ",";
@@ -85,7 +85,7 @@ foreach($extension_method_info as $record) {
* Marks the "tested" status of methods in $method_info according
* to whether they are tested in $phpt_files
*/
-function mark_methods_as_tested($method_info, $phpt_files) {
+function mark_methods_as_tested($method_info, $phpt_files) {
foreach($phpt_files as $phpt_file) {
$tested_functions = extract_tests($phpt_file);
@@ -98,7 +98,7 @@ function mark_methods_as_tested($method_info, $phpt_files) {
// matched the method name
if ($current_method_record[IS_DUPLICATE] == true) {
// we cannot be sure which class this method corresponds to,
- // so mark method as needing to be verified
+ // so mark method as needing to be verified
$current_method_record[IS_TESTED] = "verify";
} else {
$current_method_record[IS_TESTED] = "yes";
@@ -115,7 +115,7 @@ function mark_methods_as_tested($method_info, $phpt_files) {
* returns an array containing a record for each defined method.
*/
function populate_method_info() {
-
+
$method_info = array();
// get functions
@@ -198,21 +198,21 @@ function get_phpt_files($dir, &$phpt_file_count, &$all_phpt)
}
/**
- * Extract tests from a specified file, returns an array of tested function tokens
- */
+ * Extract tests from a specified file, returns an array of tested function tokens
+ */
function extract_tests($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();
}
-
+
$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;
}
diff --git a/scripts/dev/gen_verify_stub b/scripts/dev/gen_verify_stub
index 1dc3ba0cee..ac6dc4434d 100755
--- a/scripts/dev/gen_verify_stub
+++ b/scripts/dev/gen_verify_stub
@@ -39,7 +39,7 @@ do
done
for TARBALL in "$PHPROOT/php-$RELEASE_VER.tar.bz2" "$PHPROOT/php-$RELEASE_VER.tar.gz" "$PHPROOT/php-$RELEASE_VER.tar.xz"
-do
+do
basename $TARBALL
echo "SHA256 hash: `sha256sum $TARBALL | cut -d' ' -f1`";
echo PGP signature: