From 10e8ef9720169639212dc146c67903f008c89c97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20D=C4=9Bdi=C4=8D?= Date: Mon, 28 Oct 2019 22:59:52 +0100 Subject: [PATCH] Added better readme --- README.md | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ceeab5a..d634e79 100644 --- a/README.md +++ b/README.md @@ -2,4 +2,27 @@ [![CircleCI branch](https://img.shields.io/circleci/project/github/marekdedic/phan-wordpress-stubs/master.svg)](https://circleci.com/gh/marekdedic/workflows/phan-wordpress-stubs/tree/master) -This repo contains stubs for WordPress functions and classes to be used with phan. +This repo contains stubs for WordPress functions and classes to be used with [phan](https://github.com/phan/phan), the PHP static analyzer. This allows for better type-checking of a codebase as the stubs all have type information. + +## Installation + +```sh +$ composer require --dev skaut/phan-wordpress-stubs +``` + +Add to your '.phan/config.php': + +```php +return [ + 'directory_list' => [ + 'vendor/skaut/phan-wordpress-stubs/stubs' + ], + 'exclude_analysis_directory_list' => [ + 'vendor/skaut/phan-wordpress-stubs/stubs' + ] +]; +``` + +## Completeness + +The stubs are not complete. If you spot any missing functions or classes, please [open an issue](https://github.com/skaut/phan-wordpress-stubs/issues/new).