A PHP codebase.
Why adopt the PSR-2 Code Style?
Many of the PHP frameworks and packages have adopted the PSR-2 Coding Style. But aside from being popular, adopting a coding style can reduce needless friction over the format of PHP code. By choosing the PSR-2 Coding Style, you share a standard coding style with the PHP Community.
The PSR-2 Shift upgrades your code to follow the PSR-2 coding style, including:
- Using only
- Normalizing PHP keywords
- Standardizing naming conventions
- Facilitating autoloading capabilities
- Adding missing visibility
- Normalizing indentation and spacing
- Adhering to PHP coding best-practices