Skip to content
This repository has been archived by the owner on Jun 28, 2022. It is now read-only.

Commit

Permalink
Revert "fix: don't change PHP functions which are reserved words (#3317
Browse files Browse the repository at this point in the history
…)" (#3322)

This reverts commit 3ff8ca9.
  • Loading branch information
bshaffer committed Dec 29, 2020
1 parent 6bc6fa8 commit 9c22369
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions showcase/php/tests/ShowcaseIntegrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class ShowcaseIntegrationTest extends TestCase
*/
public function testUnary($client)
{
$response = $client->echo([
$response = $client->echo_([
'content' => '"Wales snail hail fails!" wails Gail'
]);
$this->assertEquals(
Expand All @@ -65,7 +65,7 @@ public function testUnary($client)
public function testFailUnary($client)
{
try {
$client->echo([
$client->echo_([
'error' => (new Status())
->setCode(Code::INVALID_ARGUMENT)
->setMessage("Unary error message"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,17 @@ public String localVarReference(Name name) {

@Override
public String publicMethodName(Name name) {
return name.toLowerCamel();
return wrapIfKeywordOrBuiltIn(name.toLowerCamel());
}

@Override
public String privateMethodName(Name name) {
return name.toLowerCamel();
return wrapIfKeywordOrBuiltIn(name.toLowerCamel());
}

@Override
public String staticFunctionName(Name name) {
return name.toLowerCamel();
return wrapIfKeywordOrBuiltIn(name.toLowerCamel());
}

@Override
Expand Down

0 comments on commit 9c22369

Please sign in to comment.