Skip to content

Commit 05d2ec1

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 0d86998 commit 05d2ec1

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;
@@ -2383,7 +2383,7 @@ public function getCExpr(): ?string
23832383

23842384
abstract class VariableLike
23852385
{
2386-
public int $flags;
2386+
protected int $flags;
23872387
public ?Type $type;
23882388
public /* readonly */ ?Type $phpDocType;
23892389
private /* readonly */ ?string $link;
@@ -3346,20 +3346,20 @@ public static function createFromGroups(array $attributeGroups): array {
33463346

33473347
class ClassInfo {
33483348
public /* readonly */ Name $name;
3349-
public int $flags;
3349+
private int $flags;
33503350
public string $type;
33513351
public /* readonly */ ?string $alias;
33523352
private /* readonly */ ?SimpleType $enumBackingType;
33533353
private /* readonly */ bool $isDeprecated;
33543354
private bool $isStrictProperties;
33553355
/** @var AttributeInfo[] */
3356-
public array $attributes;
3356+
private array $attributes;
33573357
private ?ExposedDocComment $exposedDocComment;
33583358
private bool $isNotSerializable;
33593359
/** @var Name[] */
3360-
public /* readonly */ array $extends;
3360+
private /* readonly */ array $extends;
33613361
/** @var Name[] */
3362-
public /* readonly */ array $implements;
3362+
private /* readonly */ array $implements;
33633363
/** @var ConstInfo[] */
33643364
public /* readonly */ array $constInfos;
33653365
/** @var PropertyInfo[] */
@@ -4159,7 +4159,7 @@ class FileInfo {
41594159
public bool $generateFunctionEntries = false;
41604160
public string $declarationPrefix = "";
41614161
public bool $generateClassEntries = false;
4162-
public bool $isUndocumentable = false;
4162+
private bool $isUndocumentable = false;
41634163
private bool $legacyArginfoGeneration = false;
41644164
private ?int $minimumPhpVersionIdCompatibility = null;
41654165

0 commit comments

Comments
 (0)