Skip to content

Commit 05dbf07

Browse files
gen_stub: further reduce the number of public properties
The following properties are made private: * `ArgInfo::$phpDocType` * `ClassInfo::$flags`, `::$attributes`, `::$extends`, `::$implements` * `FileInfo::$isUndocumentable` The following are made protected: * `VariableLike::$flags`
1 parent c89d7a7 commit 05dbf07

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

build/gen_stub.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -775,7 +775,7 @@ class ArgInfo {
775775
public /* readonly */ string $sendBy;
776776
public /* readonly */ bool $isVariadic;
777777
public ?Type $type;
778-
public /* readonly */ ?Type $phpDocType;
778+
private /* readonly */ ?Type $phpDocType;
779779
public ?string $defaultValue;
780780
/** @var AttributeInfo[] */
781781
public array $attributes;
@@ -2410,7 +2410,7 @@ public function getCExpr(): ?string
24102410

24112411
abstract class VariableLike
24122412
{
2413-
public int $flags;
2413+
protected int $flags;
24142414
public ?Type $type;
24152415
public /* readonly */ ?Type $phpDocType;
24162416
private /* readonly */ ?string $link;
@@ -3373,20 +3373,20 @@ public static function createFromGroups(array $attributeGroups): array {
33733373

33743374
class ClassInfo {
33753375
public /* readonly */ Name $name;
3376-
public int $flags;
3376+
private int $flags;
33773377
public string $type;
33783378
public /* readonly */ ?string $alias;
33793379
private /* readonly */ ?SimpleType $enumBackingType;
33803380
private /* readonly */ bool $isDeprecated;
33813381
private bool $isStrictProperties;
33823382
/** @var AttributeInfo[] */
3383-
public array $attributes;
3383+
private array $attributes;
33843384
private ?ExposedDocComment $exposedDocComment;
33853385
private bool $isNotSerializable;
33863386
/** @var Name[] */
3387-
public /* readonly */ array $extends;
3387+
private /* readonly */ array $extends;
33883388
/** @var Name[] */
3389-
public /* readonly */ array $implements;
3389+
private /* readonly */ array $implements;
33903390
/** @var ConstInfo[] */
33913391
public /* readonly */ array $constInfos;
33923392
/** @var PropertyInfo[] */
@@ -4186,7 +4186,7 @@ class FileInfo {
41864186
public bool $generateFunctionEntries = false;
41874187
public string $declarationPrefix = "";
41884188
public bool $generateClassEntries = false;
4189-
public bool $isUndocumentable = false;
4189+
private bool $isUndocumentable = false;
41904190
private bool $legacyArginfoGeneration = false;
41914191
private ?int $minimumPhpVersionIdCompatibility = null;
41924192

0 commit comments

Comments
 (0)