diff options
author | Peter Kokot <peterkokot@gmail.com> | 2018-10-13 14:14:50 +0200 |
---|---|---|
committer | Peter Kokot <peterkokot@gmail.com> | 2018-10-13 14:14:50 +0200 |
commit | 902d39a3a79c6efe93c8879575fdd5a759cf03de (patch) | |
tree | e6ec0af8ac4333de34f581c2c7b5a2eb93e635a1 /scripts/dev/generate-phpt/src/gtCodeSnippet.php | |
parent | 581f0141b6dd8d20e71612f90b01507ed0783db8 (diff) | |
download | php-git-902d39a3a79c6efe93c8879575fdd5a759cf03de.tar.gz |
Trim trailing whitespace in source code files
Diffstat (limited to 'scripts/dev/generate-phpt/src/gtCodeSnippet.php')
-rw-r--r-- | scripts/dev/generate-phpt/src/gtCodeSnippet.php | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/scripts/dev/generate-phpt/src/gtCodeSnippet.php b/scripts/dev/generate-phpt/src/gtCodeSnippet.php index 220fbdf699..dc6543201a 100644 --- a/scripts/dev/generate-phpt/src/gtCodeSnippet.php +++ b/scripts/dev/generate-phpt/src/gtCodeSnippet.php @@ -2,7 +2,7 @@ /** * Retrieves code snippets for adding to test cases - * + * */ class gtCodeSnippet { @@ -14,21 +14,21 @@ class gtCodeSnippet * @return array */ public static function get($name) { - + $filename = dirname(__FILE__) . '/codeSnippets/' . $name . '.txt'; if (!file_exists($filename)) { throw new LogicException('The code snippet ' . $name . ' does not exist'); } - + $lines = file($filename); foreach($lines as $l) { $array[] = rtrim($l); } return $array; } - - + + /** * Append the code snippet on to an existing array * @@ -47,11 +47,11 @@ class gtCodeSnippet foreach ($text as $t) { $array[] = rtrim($t); } - + return $array; } - - + + /** * Appends blank entries on to an array * @@ -64,9 +64,9 @@ class gtCodeSnippet for ($i=0; $i< $numberOfLines; $i++) { $array[] = ""; } - + return $array; } - + } ?>
\ No newline at end of file |