GS/BS
← Standards directory
Type safety

PHPStan.

Check PHP type assumptions

Analyze project code at an explicit rule level. Capture existing errors in a reviewed baseline and require new code to satisfy the chosen level.

PHP

Community rubric · v1

The evidence

Evidence coverage3 / 8
3 supported · 5 unresolved

One point for each verified check. Unknown means we still need evidence. Contrary evidence records an observed result that goes against the criterion.

Latest evidence review ·

  • Definition

    Verified

    PHPStan publishes cumulative analysis levels with different type requirements. The adopted level determines which type assumptions fail.

    Cited source ↗
  • Measurement

    Verified

    The analyse command reports type errors for selected paths; a successful error-free analysis exits 0.

    Cited source ↗
  • Conformance

    Unknown

    No reviewed evidence is recorded for this dimension.

    What would demonstrate a violation? Contribute evidence ↗

  • CI enforcement

    Unknown

    No reviewed evidence is recorded for this dimension.

    Can a change trigger a useful check? Contribute evidence ↗

  • Getting started

    Unknown

    No reviewed evidence is recorded for this dimension.

    Can a newcomer complete a first run? Contribute evidence ↗

  • Real-world adoption

    Verified

    CodeRabbit applies PHPStan to configured PHP paths, preferring the repository Composer binary and choosing its analysis level by review policy.

    Cited source ↗
  • Agent guidance

    Unknown

    No reviewed evidence is recorded for this dimension.

    Can an agent act on a specific finding? Contribute evidence ↗

  • Agent portability

    Unknown

    No reviewed evidence is recorded for this dimension.

    Does the practice work in two agent harnesses? Contribute evidence ↗

Use this standard

Run the check with the tool installed and configured for your project.

vendor/bin/phpstan analyse

Agent prompt

Use PHPStan in this repository to meet this standard: Check PHP type assumptions. Analyze project code at an explicit rule level. Capture existing errors in a reviewed baseline and require new code to satisfy the chosen level. Inspect the repository configuration, record the baseline and exact reproduction steps, then add the smallest repeatable check that detects a regression.
Read the agent skill ↗

Primary source

PHPStan documentation ↗