onepix / wp-coding-standards
PHP_CodeSniffer rules (sniffs) to enforce WordPress coding conventions
Installs: 165
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:phpcodesniffer-standard
Requires
- php: ^8.1
- squizlabs/php_codesniffer: *
- wp-coding-standards/wpcs: ^3
Requires (Dev)
- phpunit/phpunit: ^10 || ^11
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