Skip to content

PHPStan level 6 compliance #311

Description

@somethingwithproof

Goal

Bring plugin_mactrack to PHPStan level 6 with zero errors.

What level 6 checks (cumulative with 0–5)

  • Level 6: Checking types of arguments passed to methods and functions
  • Level 5: Report missing type hints on methods and properties
  • Level 4: Report partially wrong union types
  • Level 3: Report calling methods and accessing properties on nullable types
  • Levels 0–2: Basic checks, mixed type strictness, etc.

Tasks

  • Add PHPStan to composer.json (require-dev) if not present
  • Add phpstan.neon or phpstan.neon.dist with level: 6
  • Run vendor/bin/phpstan analyse -l 6 and fix all reported errors
  • Add type hints to parameters and return types where missing
  • Fix argument type mismatches
  • Add to CI (e.g., composer run phpstan or similar)

Reference

Related

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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