Skip to content

PHPStan level 8 compliance #312

@somethingwithproof

Description

@somethingwithproof

Goal

Bring plugin_mactrack to PHPStan level 8 with zero errors.

What level 8 adds (cumulative with 0–7)

  • Level 8: Return types, types assigned to properties
  • Level 7: Basic dead code checking (always false instanceof, dead else, unreachable code)
  • Level 6: Checking types of arguments passed to methods and functions
  • Level 5: Report missing type hints
  • Levels 0–4: Union types, nullable access, mixed strictness, etc.

Tasks

  • Achieve PHPStan level 6 first (PHPStan level 6 compliance #311)
  • Add explicit return types to all methods
  • Add property type declarations
  • Fix dead code (unreachable branches, always-false checks)
  • Update config to level: 8
  • Run vendor/bin/phpstan analyse -l 8 with zero errors

Reference

Related

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