onepix / wp-coding-standards
PHP_CodeSniffer rules (sniffs) to enforce WordPress coding conventions
Package info
github.com/onepixnet/wp-coding-standards
Type:phpcodesniffer-standard
pkg:composer/onepix/wp-coding-standards
v2.0.3
2025-10-05 06:06 UTC
Requires
- php: ^8.3
- squizlabs/php_codesniffer: 3.x-dev
- wp-coding-standards/wpcs: ^3
Requires (Dev)
- phpunit/phpunit: ^12
- vimeo/psalm: ^6.8
README
WP Coding Standards
Based on wp-coding-standards/wpcs.
- Declarations Sniffs
- WP Sniffs
Declarations Sniffs
WpOnepixStandard.Declarations.StrictTypes
Checks for mandatory declare(strict_types=1); after <?php. Takes into account other parameters besides strict_types
WP Sniffs
WpOnepixStandard.WP.AbspathAfterNamespace
Looking for a mandatory defined('ABSPATH') || exit; check after namespace so that you can't go to the file directly from the url