imath / required-block-attributes

WordPress plugin to check required block attributes are set when a post is published
GNU General Public License v2.0
3 stars 0 forks source link

Consider benefiting from static analysis #1

Open szepeviktor opened 4 years ago

szepeviktor commented 4 years ago

Powered by @phpstan

composer require --dev szepeviktor/phpstan-wordpress
vendor/bin/phpstan analyze

phpstan.neon.dist

includes:
    - vendor/szepeviktor/phpstan-wordpress/extension.neon
parameters:
    level: max
    inferPrivatePropertyTypeFromConstructor: true
    paths:
        - class-required-block-attributes.php
        - inc/
    autoload_files:
        - class-required-block-attributes.php
        - inc/admin.php
        - inc/functions.php
        - inc/globals.php
        - inc/registers.php
        - inc/example.php
szepeviktor commented 4 years ago

Mainly missing property definitions.