wpsyntex/polylang-stubs

Polylang and Polylang Pro function and class declaration stubs for static analysis.

3.2 2022-06-13 08:42 UTC

This package is auto-updated.

Last update: 2022-08-19 08:06:42 UTC


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 giacocorsiglia/stubs-generator.

Requirements

  • PHP >=7.1

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