wpsyntex / polylang-stubs
Polylang and Polylang Pro function and class declaration stubs for static analysis.
Installs: 106 544
Dependents: 3
Suggesters: 0
Security: 0
Stars: 4
Watchers: 3
Forks: 0
Open Issues: 0
Requires (Dev)
- php: ^7.3 || ^8.0
- php-stubs/generator: ^0.8.4
Suggests
- wpsyntex/polylang-phpstan: Polylang extension for PHPStan
README
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.
Requirements
- PHP >=7.3
Installation
Require this package as a development dependency with Composer.
composer require --dev wpsyntex/polylang-stubs
Usage in PHPStan
Include the stubs in the PHPStan configuration file.
parameters: bootstrapFiles: - vendor/wpsyntex/polylang-stubs/polylang-stubs.php
It's also recommended to use the Polylang PHPStan extension wpsyntex/polylang-phpstan