Download the PHP package byteever/byteever-sniffs without Composer
On this page you can find all versions of the php package byteever/byteever-sniffs. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package byteever-sniffs
ByteEver Sniffs
A comprehensive PHP_CodeSniffer ruleset that extends WordPress Coding Standards with ByteEver-specific conventions for modern PHP development.
Features
- 🎯 WordPress-First: Built on top of WordPress Coding Standards (WPCS) 3.1.0
- 🐘 PHP Compatibility: Supports PHP 7.4 - 8.5 with PHPCompatibility checks
- ⚡ Performance: Configured for parallel processing with 8 threads
- 🎨 Sensible Defaults: Pre-configured with practical exclusions for real-world development
- 📝 Tab Indentation: Enforces consistent tab-based indentation
- 🔧 Customizable: Easy to extend and override rules per project
What's Included
Base Standards
- WordPress: Complete WordPress coding standards
- WordPress-Extra: Additional WordPress-specific rules
- WordPress-Docs: Documentation standards
- PHPCompatibilityWP: WordPress-specific PHP compatibility checks
ByteEver Customizations
- Tab-based indentation (1 tab = 1 indent level)
- Space inside parentheses for better readability
- Relaxed file naming requirements
- Allowance for shorthand array syntax
[] - Sensible exclusions for database queries and nonce verification
- Comment and doc comment tokens ignored in indentation checks
Installation
Install via Composer:
The package will automatically:
- Install PHP_CodeSniffer and required dependencies
- Register the
ByteEver-Defaultstandard - Set it as the default standard for your project
Usage
Command Line
Quick Check
Using Composer Script
Custom Configuration
IDE Integration
For better IDE integration, create a .phpcs.xml.dist file in your project root:
Continuous Integration
Add to your CI workflow:
Configuration Details
PHP Version Support
- Minimum: PHP 7.4
- Maximum: PHP 8.5
- Compatibility: Uses PHPCompatibilityWP for WordPress-specific compatibility checks
Key Rules Applied
- WordPress Coding Standards (with sensible exclusions)
- Tab indentation (1 tab per indent level)
- Space inside parentheses for readability
- Superfluous whitespace detection
- PHP compatibility checking for WordPress
Excluded Rules
The following rules are excluded for practical development:
- File naming conventions (WordPress.Files.FileName)
- Nonce verification requirements
- Direct database query restrictions
- Global variable override prohibitions
- Some documentation capitalization requirements
Customization
Project-Level Overrides
Create a phpcs.xml.dist file to override or add rules:
Inline Annotations
Disable rules for specific code blocks:
Requirements
- PHP 7.4 or higher
- Composer
- PHP_CodeSniffer 3.9.0 or higher
Dependencies
dealerdirect/phpcodesniffer-composer-installer: ^1.0phpcompatibility/phpcompatibility-wp: ^2.1wp-coding-standards/wpcs: ^3.1.0
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Test with
composer run phpcs - Submit a pull request
License
GPL-3.0-only
Author
Sultan Nasir Uddin
Email: [email protected]
Organization: ByteEver
Part of the ByteEver development toolkit for WordPress and PHP projects.
All versions of byteever-sniffs with dependencies
phpcompatibility/phpcompatibility-wp Version ^2.1.7
wp-coding-standards/wpcs Version ^3.1.0