Download the PHP package onepix/wordpress-stubs-generator without Composer
On this page you can find all versions of the php package onepix/wordpress-stubs-generator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download onepix/wordpress-stubs-generator
More information about onepix/wordpress-stubs-generator
Files in onepix/wordpress-stubs-generator
Package wordpress-stubs-generator
Short Description Generate stubs from any PHP code for IDE completion and static analysis.
License MIT
Homepage https://github.com/0zd0/wordpress-stubs-generator
Informations about the package wordpress-stubs-generator
Wordpress Stubs Generator
Use this tool to generate stub declarations for functions, classes, interfaces, and global variables defined in any PHP code. The stubs can subsequently be used to facilitate IDE completion or static analysis via Psalm, PHPStan or potentially other tools. Stub generation is particularly useful for code which mixes definitions with side-effects.
Install
Command Line Usage
To write the stubs to a file (and see a few statistics in the stdout):
For the complete set of command line options:
Example
The idea is to turn this:
Into this:
Simple Example
Additional Features
You can restrict the set of symbol types for which stubs are generated:
The set of symbol types are:
StubsGenerator::FUNCTIONS
: Function declarations.StubsGenerator::CLASSES
: Class declarations.StubsGenerator::TRAITS
: Trait declarations.StubsGenerator::INTERFACES
: Interface declarations.StubsGenerator::DOCUMENTED_GLOBALS
: Global variables, but only those with a doc comment.StubsGenerator::UNDOCUMENTED_GLOBALS
: Global variable, but only those without a doc comment.StubsGenerator::GLOBALS
: Shortcut to include both documented and undocumented global variables.StubsGenerator::CONSTANTS
: Constant declarations.StubsGenerator::DEFAULT
: Shortcut to include everything except undocumented global variables.StubsGenerator::ALL
: Shortcut to include everything.
All versions of wordpress-stubs-generator with dependencies
nikic/php-parser Version ^4.17
symfony/filesystem Version ^6.4
symfony/finder Version ^6.4
symfony/console Version ^6.4