Easily switch between PHP coding standards in VS Code. Integrates with PHP_CodeSniffer to provide quick access to all installed coding standards.
- 🔄 Quick switching between PHP coding standards (PSR-12, WordPress, etc.)
- 🔍 Automatic detection of installed standards
- 📊 Status bar indicator showing current standard
- ⚡️ Keyboard shortcut support
- 🔌 Integration with PHP Sniffer & Beautifier
- PHP 8.2 or higher
- PHP_CodeSniffer (
phpcs
) installed globally or locally - PHP Sniffer & Beautifier VS Code extension
- Open VS Code
- Press
Cmd+P
to open the Quick Open dialog - Type
ext install tommcfarlin.code-standard-selector
- Press Enter
- Open a PHP file
- Click the coding standard indicator in the status bar (or use
Cmd+Alt+S
) - Select your preferred coding standard from the list
Select Code Standard
: Choose a PHP coding standard (Command Palette or status bar)
- macOS:
Cmd+Alt+S
- Windows/Linux:
Ctrl+Alt+S
This extension contributes the following settings:
phpsab.standard
: The selected PHP coding standardphpsab.executablePathCS
: Path to PHPCS executable
Pull requests are welcome! For major changes, please open an issue first to discuss what you would like to change.
git clone https://github.com/yourusername/code-standard-selector.git
cd code-standard-selector
npm install
code .
Press F5
to start debugging the extension.
npm test