Skip to content

Internal classes should use @psalm-readonly for properties? (pure-ish functions) #2

@dkreuer

Description

@dkreuer

The internal class can be simplified by using psalm annotations to mark properties readonly and make them public. Write access would be detected by psalm and thrown as error.

When not having the requirement of php 7.2 (which still exists) https://github.com/Roave/you-are-using-it-wrong can be used afterwards to enforce the correct use of the library.

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