Skip to content

Commit 27ebf47

Browse files
committed
Use readonly properties + CPP for EnumCaseName in gen_stub.php
1 parent fd285a8 commit 27ebf47

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

build/gen_stub.php

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -902,13 +902,10 @@ public function getDeclarationName(): string
902902
}
903903

904904
class EnumCaseName {
905-
public /* readonly */ Name $enum;
906-
public /* readonly */ string $case;
907-
908-
public function __construct(Name $enum, string $case)
909-
{
910-
$this->enum = $enum;
911-
$this->case = $case;
905+
public function __construct(
906+
public readonly Name $enum,
907+
public readonly string $case
908+
) {
912909
}
913910

914911
public function __toString(): string

0 commit comments

Comments
 (0)