This package provides stub declarations for Polylang and Polylang Pro. These stubs can help plugin and theme developers leverage static analysis tools like PHPStan.
Stubs are generated directly from the source using php-stubs/generator.
- PHP >=7.3
Require this package as a development dependency with Composer.
composer require --dev wpsyntex/polylang-stubsInclude the stubs in the PHPStan configuration file.
parameters:
  bootstrapFiles:
    - vendor/wpsyntex/polylang-stubs/polylang-stubs.phpIt's also recommended to use the Polylang PHPStan extension wpsyntex/polylang-phpstan