Lines Matching refs:code
66 $origCode = $code = file_get_contents($path); variable
69 $code = stripTrailingWhitespace($code); variable
73 $code = stripTrailingWhitespace($code); variable
74 $code = reindentToSpaces($code); variable
76 $code = transformTestCode($code, function(string $code) { variable
77 $code = stripTrailingWhitespace($code); variable
78 $code = reindentToSpaces($code); variable
79 return $code;
83 if ($origCode !== $code) {
84 file_put_contents($path, $code);
88 function stripTrailingWhitespace(string $code): string { argument
89 return preg_replace('/\h+$/m', '', $code);
92 function reindentToTabs(string $code): string { argument
99 }, $code);
102 function reindentToSpaces(string $code): string { argument
119 }, $code);
122 function transformTestCode(string $code, callable $transformer): string { argument
124 if (strpos($code, '--WHITESPACE_SENSITIVE--') !== false) {
125 return $code;
133 $code