Custom PHPStan Rules for Consistence library (https://github.com/phpstan/phpstan and https://github.com/consistence/consistence/)
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.

README.md

Custom PHPStan Rules for Consistence library

Build Status Coverage Status Latest Stable Version License

This repository provides following custom PHPStan rules for Consistence library

  • Check that no class extends \Consistence\ObjectPrototype or uses \Consistence\Type\ObjectMixinTrait somewhere in its hierarchy tree. The type of errors it prevents is caught by PHPStan so there is no need to extend/use anymore.
  • Check that Consistence function wrappers (from ArrayType) are used for array manipulation

Usage

To use those rules, require them in Composer:

composer require --dev mhujer/phpstan-consistence

And include them in your project's PHPStan config:

includes:
    - vendor/mhujer/phpstan-consistence/rules.neon