graphql-wp icon indicating copy to clipboard operation
graphql-wp copied to clipboard

Introduce static analysis :)

Open szepeviktor opened this issue 5 years ago • 0 comments
trafficstars

composer require --dev "szepeviktor/phpstan-wordpress:^0.6.2" php-stubs/woocommerce-stubs
vendor/bin/phpstan analyze -l 4

phpstan.neon.dist

includes:
    - vendor/szepeviktor/phpstan-wordpress/extension.neon
parameters:
    level: max
    inferPrivatePropertyTypeFromConstructor: true
    paths:
        - src/
    scanFiles:
        - vendor/php-stubs/woocommerce-stubs/woocommerce-stubs.php
    ignoreErrors:
        # Uses func_get_args()
        - '#^Function apply_filters(_ref_array)? invoked with [34567] parameters, 2 required\.$#'

szepeviktor avatar Aug 18 '20 03:08 szepeviktor