Skip to content

class-string should not be settable using string literal #223

@mvorisek

Description

@mvorisek

repro: https://phpstan.org/r/1b7e94a5-9263-4f0c-83f8-a2964c1b5d5c

This is a feature request to emit a phpstan error /w strict rules to enforce the user to set the string using Xxx::class syntax.

Xxx::class is guaranteed to be always checked by static analysis, is more readable and always in canonical form - no leading backslash.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions