Skip to content

Replace TypeSpecifyingExtension with @phpstan-assert for type narrowing #168

@swissspidy

Description

@swissspidy

Now that this package requires PHPStan 1.10.0+, It seems like IsWpErrorFunctionTypeSpecifyingExtension, AssertWpErrorTypeSpecifyingExtension, and AssertNotWpErrorTypeSpecifyingExtension extensions could be replaced with @phpstan-assert annotations, which were introduced in PHPStan 1.9.0.

These annotations would need to be added in php-stubs/wordpress-tests-stubs / php-stubs/wordpress-stubs of course.

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