Skip to content

taptima/phpstan-custom

Repository files navigation

Taptima customs extensions for PHPStan

Latest Stable Version License

This extension provides following features:

  • Validates common entity properties existence of methods set*, get*.
  • Validates boolean entity properties existence of methods set*, is* or has*.
  • Validates ArrayCollection entity properties existence of methods add*, remove* and get*.

Installation

Open a command console, enter your project directory and execute the following command to download the latest stable version of this extension:

composer require --dev taptima/phpstan-custom dev-master

Then include extension.neon in your project's PHPStan config:

includes:
    - vendor/taptima/phpstan-custom/extension.neon

and

includes:
    - vendor/taptima/phpstan-custom/rules.neon

This extensions depends on phpstan-doctrine, so you have to configure it.

Contribution

Before to create a pull request to submit your contributon, you must:

  • run tests and be sure nothing is broken

How to run tests

make test