8000 GitHub - duxthefux/phpstan-extensions: Extensions for PHPStan
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

duxthefux/phpstan-extensions

 
 

Repository files navigation

Slam PHPStan extensions

Build Status Code Coverage Packagist

Extensions for PHPStan

Installation

To use this extension, require it in Composer:

composer require --dev slam/phpstan-extensions

And include slam-rules.neon in your project's PHPStan config:

includes:
    - vendor/slam/phpstan-extensions/conf/slam-rules.neon

Rules

  1. SlamPhpStan\UnusedVariableRule: check for variable inside functions never used after initial assignment
  2. SlamPhpStan\StringToClassRule: requires strings that refer to classes to be expressed with ::class notation
  3. SlamPhpStan\GotoRule: no goto allowed
  4. SlamPhpStan\ClassNotationRule:
    1. Interfaces must end with "Interface"
    2. Traits must end with "Trait"
    3. Abstract classes must start with "Abstract"
    4. Exceptions must end with "Exception"
  5. SlamPhpStan\PhpUnitFqcnAnnotationRule: classes found in following PHPUnit annotations must exist:
    1. @expectedException
    2. @covers
    3. @coversDefaultClass
    4. @uses

About

Extensions for PHPStan

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%
0