diff --git a/README.md b/README.md index 94595d7..8d3cd96 100644 --- a/README.md +++ b/README.md @@ -629,7 +629,7 @@ testing. **Bad:** ```php -function parseBetterJSAlternative(string $code): void +function parseBetterPHPAlternative(string $code): void { $regexes = [ // ... @@ -656,7 +656,7 @@ function parseBetterJSAlternative(string $code): void **Bad too:** -We have carried out some of the functionality, but the `parseBetterJSAlternative()` function is still very complex and not testable. +We have carried out some of the functionality, but the `parseBetterPHPAlternative()` function is still very complex and not testable. ```php function tokenize(string $code): array @@ -686,7 +686,7 @@ function lexer(array $tokens): array return $ast; } -function parseBetterJSAlternative(string $code): void +function parseBetterPHPAlternative(string $code): void { $tokens = tokenize($code); $ast = lexer($tokens); @@ -698,7 +698,7 @@ function parseBetterJSAlternative(string $code): void **Good:** -The best solution is move out the dependencies of `parseBetterJSAlternative()` function. +The best solution is move out the dependencies of `parseBetterPHPAlternative()` function. ```php class Tokenizer @@ -734,7 +734,7 @@ class Lexer } } -class BetterJSAlternative +class BetterPHPAlternative { private $tokenizer; private $lexer;