Skip to content

Commit fb46ca6

Browse files
authored
Fix heading levels in readme (#255)
1 parent 8fe976f commit fb46ca6

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Static analysis for the WordPress ecosystem.
2020
- [PHPStan](https://phpstan.org/)
2121
- [WordPress](https://wordpress.org/)
2222

23-
### Installation
23+
## Installation
2424

2525
Add this package to your project.
2626

@@ -41,7 +41,7 @@ includes:
4141
- vendor/szepeviktor/phpstan-wordpress/extension.neon
4242
```
4343

44-
### Configuration
44+
## Configuration
4545

4646
Needs no extra configuration. :smiley: Simply configure PHPStan - for example - this way.
4747

@@ -58,19 +58,19 @@ Please read [PHPStan Config Reference](https://phpstan.org/config-reference).
5858
:bulb: Use Composer autoloader or a
5959
[custom autoloader](https://github.com/szepeviktor/debian-server-tools/blob/master/webserver/wp-install/wordpress-autoloader.php)!
6060

61-
### Usage
61+
## Usage
6262

6363
Just start the analysis: `vendor/bin/phpstan analyze`
6464
then fix an error and `GOTO 10`!
6565

6666
You find further information in the `examples` directory
6767
e.g. [`examples/phpstan.neon.dist`](/examples/phpstan.neon.dist)
6868

69-
### Usage in WooCommerce webshops
69+
## Usage in WooCommerce webshops
7070

7171
Please see [WooCommerce Stubs](https://github.com/php-stubs/woocommerce-stubs)
7272

73-
### What this extension does
73+
## What this extension does
7474

7575
- Makes it possible to run PHPStan on WordPress plugins and themes
7676
- Loads [`php-stubs/wordpress-stubs`](https://github.com/php-stubs/wordpress-stubs) package
@@ -79,7 +79,7 @@ Please see [WooCommerce Stubs](https://github.com/php-stubs/woocommerce-stubs)
7979
- Handles special functions and classes e.g. `is_wp_error()`
8080
- Validates the optional docblock that precedes a call to `apply_filters()` and treats the type of its first `@param` as certain
8181

82-
### Usage of an `apply_filters()` docblock
82+
## Usage of an `apply_filters()` docblock
8383

8484
WordPress core - and the wider WordPress ecosystem - uses PHPDoc docblocks
8585
in a non-standard manner to document the parameters passed to `apply_filters()`.
@@ -102,7 +102,7 @@ according to the first `@param` tag. In the example above this means PHPStan tre
102102
To make the best use of this feature,
103103
ensure that the type of the first `@param` tag in each of these such docblocks is accurate and correct.
104104

105-
### Make your code testable
105+
## Make your code testable
106106

107107
- Write clean OOP code: 1 class per file, no other code in class files outside `class Name { ... }`
108108
- Structure your code: uniform class names (WPCS or PSR-4), keep classes in a separate directory `inc/`
@@ -118,7 +118,7 @@ ensure that the type of the first `@param` tag in each of these such docblocks i
118118
[Neutron Standard](https://github.com/Automattic/phpcs-neutron-standard)
119119
- Do not enable `exit_error` in `WP_CLI::launch` or `WP_CLI::runcommand` to keep your code testable
120120

121-
### Dirty corner (FAQ)
121+
## Dirty corner (FAQ)
122122

123123
WordPress uses conditional function and class definition for override purposes.
124124
Use `sed` command to exclude function stubs when they are previously defined.

0 commit comments

Comments
 (0)