diff --git a/example/php7.4/Genre.php b/example/php7.4/Genre.php index 04b3ea9..9f846e1 100644 --- a/example/php7.4/Genre.php +++ b/example/php7.4/Genre.php @@ -19,11 +19,11 @@ * @property-read string $value * * Cases: - * @method static Genre ROMANCE - * @method static Genre COMEDY - * @method static Genre DRAMA - * @method static Genre NON_FICTION - * @method static Genre SCIENTIFIC_WORK + * @method static Genre ROMANCE() + * @method static Genre COMEDY() + * @method static Genre DRAMA() + * @method static Genre NON_FICTION() + * @method static Genre SCIENTIFIC_WORK() */ final class Genre implements \JsonSerializable { diff --git a/src/Generator/Builder/EnumLegacyBuilder.php b/src/Generator/Builder/EnumLegacyBuilder.php index 099923a..850180e 100644 --- a/src/Generator/Builder/EnumLegacyBuilder.php +++ b/src/Generator/Builder/EnumLegacyBuilder.php @@ -116,7 +116,7 @@ public function build(Enum $enum, PhpNamespace $ns): EnumType|ClassType $casesMap = []; foreach ($enum->getCases() as $case => $value) { - $class->addComment("@method static {$enum->getShortName()} $case"); + $class->addComment("@method static {$enum->getShortName()} $case()"); $casesMap[] = new Literal("self::$case()"); }