Skip to content

Commit

Permalink
fix enum virtual method signature (psalm)
Browse files Browse the repository at this point in the history
  • Loading branch information
klkvsk committed Apr 18, 2023
1 parent 451c1ac commit f378974
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions example/php7.4/Genre.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
2 changes: 1 addition & 1 deletion src/Generator/Builder/EnumLegacyBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()");
}

Expand Down

0 comments on commit f378974

Please sign in to comment.