PHP Code Standard Selector
Easily switch between PHP coding standards in VS Code. Integrates with PHP_CodeSniffer to provide quick access to all installed coding standards.
Features
- 🔄 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
Requirements
Installation
- Open VS Code
- Press
Cmd+P to open the Quick Open dialog
- Type
ext install tommcfarlin.code-standard-selector
- Press Enter
Usage
- 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
Commands
Select Code Standard : Choose a PHP coding standard (Command Palette or status bar)
Keyboard Shortcuts
- macOS:
Cmd+Alt+S
- Windows/Linux:
Ctrl+Alt+S
Extension Settings
This extension contributes the following settings:
phpsab.standard : The selected PHP coding standard
phpsab.executablePathCS : Path to PHPCS executable
Contributing
Pull requests are welcome! For major changes, please open an issue first to discuss what you would like to change.
Development
git clone https://github.com/yourusername/code-standard-selector.git
cd code-standard-selector
npm install
code .
Press F5 to start debugging the extension.
Running Tests
npm test
| |