Lines Matching refs:code
65 $origCode = $code = file_get_contents($path); variable
68 $code = stripTrailingWhitespace($code); variable
72 $code = stripTrailingWhitespace($code); variable
73 $code = reindentToSpaces($code); variable
75 $code = transformTestCode($code, function(string $code) { variable
76 $code = stripTrailingWhitespace($code); variable
77 $code = reindentToSpaces($code); variable
78 return $code;
82 if ($origCode !== $code) {
83 file_put_contents($path, $code);
87 function stripTrailingWhitespace(string $code): string { argument
88 return preg_replace('/\h+$/m', '', $code);
91 function reindentToTabs(string $code): string { argument
98 }, $code);
101 function reindentToSpaces(string $code): string { argument
118 }, $code);
121 function transformTestCode(string $code, callable $transformer): string { argument
123 if (strpos($code, '--WHITESPACE_SENSITIVE--') !== false) {
124 return $code;
132 $code