Skip to content

Conversation

@calebdw
Copy link
Contributor

@calebdw calebdw commented Sep 14, 2025

Closes rectorphp/rector#9374

Thanks!


private function convertToPascalCase(string $name): string
{
if ($this->isPascalCase($name)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use existing convertToPascalCase() method, compare, if same, then skip

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's not going to work here, the convertToPascalCase() method is not idempotent

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that strange that the check already there

if ($currentName === $pascalCaseName) {
continue;
}

I am on mobile, I will check when I am back to PC

Copy link
Member

@samsonasik samsonasik Sep 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've updated to use existing convertToPascalCase method 2a86213

@samsonasik samsonasik force-pushed the calebdw/push-qsyqklmzmtxo branch from a0d2cc9 to 2a86213 Compare September 14, 2025 07:53
@samsonasik
Copy link
Member

@calebdw this should be ok now :)

@samsonasik samsonasik merged commit 69764a7 into rectorphp:main Sep 14, 2025
49 checks passed
@samsonasik
Copy link
Member

Thank you @calebdw

@calebdw calebdw deleted the calebdw/push-qsyqklmzmtxo branch September 14, 2025 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect behavior of EnumCaseToPascalCaseRector

2 participants