Files
wp-plugin-starter-template-…/phpstan.neon.dist
T
marcus 2f91c3e6af WP Plugin Starter 1.0.0: a fresh start
The parts every wpallstars plugin needs: settings screen with search and an empty General tab, Read Me tab, features as classes, replaced plugins, the shared GitHub updater, release and check scripts, CI and the shared rules. scripts/rename-plugin.sh starts a new plugin; scripts/sync-core.sh keeps plugins' core files in step with this starter. Built with aidevops (https://aidevops.sh).
2026-10-03 03:30:42 +01:00

37 lines
1.3 KiB
Plaintext

# PHPStan: finds calls to functions, methods and classes that do not exist,
# wrong argument counts and types, and code that cannot run, using the
# WordPress stubs (szepeviktor/phpstan-wordpress) and PHP 7.4's functions.
#
# phpstan-baseline.neon is empty: every finding fails the check. Fix the
# code. Where PHPStan or the stubs are wrong, add an entry under
# ignoreErrors with the identifier, the file and the reason: here for the
# files every plugin made from the starter shares, in phpstan-plugin.neon
# for this plugin's own files and paths. Never put findings in the baseline
# to get a change through.
includes:
- phpstan-baseline.neon
- phpstan-plugin.neon
parameters:
level: 5
phpVersion: 70400
# Result cache, kept between CI runs so only changed files are analysed again.
tmpDir: .cache/phpstan
paths:
- wp-plugin-starter-template.php
- uninstall.php
- includes
- admin
bootstrapFiles:
- scripts/phpstan-bootstrap.php
reportUnmatchedIgnoredErrors: true
treatPhpDocTypesAsCertain: false
ignoreErrors:
# Closures that change variables passed by reference (use (&$x)):
# PHPStan does not see the changes, so it reads them as never set.
-
identifiers:
- if.alwaysFalse
- identical.alwaysFalse
path: admin/includes/class-readme-manager.php