8000 [make:entity] managing keyword prefixes (is, has) for boolean properties getters by ClemRiviere · Pull Request #1493 · symfony/maker-bundle · GitHub
[go: up one dir, main page]

Skip to content

[make:entity] managing keyword prefixes (is, has) for boolean properties getters #1493

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Mar 27, 2024
Prev Previous commit
Next Next commit
Enhancing getGetterName signature
  • Loading branch information
ClemRiviere committed Mar 27, 2024
commit 0281cd90ac2261bf706f7ca7d8cd6b9f8d3cd7ce
4 changes: 2 additions & 2 deletions src/Util/ClassSourceManipulator.php
Original file line number Diff line number Diff line change
Expand Up @@ -273,8 +273,8 @@ public function addGetter(string $propertyName, $returnType, bool $isReturnTypeN
$methodName = $this->getGetterName($propertyName, $returnType);
$this->addCustomGetter($propertyName, $methodName, $returnType, $isReturnTypeNullable, $commentLines);
}
private function getGetterName($propertyName, $returnType): string

private function getGetterName(string $propertyName, $returnType): string
{
if ('bool' !== $returnType) {
return 'get'.Str::asCamelCase($propertyName);
Expand Down
0