Skip to content

Make properties on Config class less magic #2861

@vv12131415

Description

@vv12131415

Currently Config class has properties accessed via __get().

Other tools like phpstan/psalm yell at me that I can't get undefined property (to quote phpstan output Access to an undefined property PHP_CodeSniffer\Config::$basepath).

My idea is to annotate every magic property that available on the Config class with @property annotation. And also move the description of $this->settings to them.

I'm talking about this part of code

private $settings = [

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions