Skip to content

aviz and isPublic() #1096

@withinboredom

Description

@withinboredom

Given the following class:

class Foo { public function __construct(protected(set) int $o) {} } $x = new Foo(42); echo $x->o; // 42

When walking over the AST for the constructor, I would expect the promoted parameter to return true for isPublic() on the property, not false. For setting, I can check isPublicSet(), but there is no way to check isPublicGet().

Tested with PHP 8.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions