Skip to content

Read-only hook never written #12702

@CsabaNa

Description

@CsabaNa

Bug report

When you create a private read-only hook it says:

Property Foo::$i is never written, only read.
See: [Always-read and written properties](https://phpstan.org/developing-extensions/always-read-written-properties)

PhpStan version: PHPStan - PHP Static Analysis Tool 2.1.4

Code snippet that reproduces the problem

https://phpstan.org/r/6bf969c0-7bb5-4c78-ba72-969f80935d2f

Expected output

No error/warning

Did PHPStan help you today? Did it make you happy in any way?

Yes 👍

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions