includes:
    - phpstan-baseline.neon

parameters:
  phpVersion:
    min: 70200
    max: 80500

  level: 6

  paths:
    - %currentWorkingDirectory%/bin/
    - %currentWorkingDirectory%/src/
    - %currentWorkingDirectory%/tests/

  excludePaths:
    - %currentWorkingDirectory%/tests/Unit/PhpStan/
    - %currentWorkingDirectory%/tests/fixtures/phpstan/

  type_perfect:
    no_mixed_property: true
    no_mixed_caller: true
    null_over_false: true
    narrow_param: false
    narrow_return: false

  ignoreErrors:
    -
      message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) .* will always evaluate to#'
      path: '%currentWorkingDirectory%/tests/'

  # This is a temporary but sadly necessary setting to allow upgrade to PHPStan 2.2.8.
  # It maintains compatibility with PHPStan 2.2.7.
  # When it has been bedded in, it can (and should) be removed.
  reportUnmatchedIgnoredErrors: false

services:
  -
    class: \Sabberworm\CSS\PhpStan\IgnoreBooleanAlways
    tags:
      - phpstan.ignoreErrorExtension