Adopt the PSR-2 Code Style

PSR-2 Shift

The PSR-2 Shift upgrades your code to follow the PSR-2 Coding Style.

Requirements

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.

Coding Style

The PSR-2 Shift upgrades your code to follow the PSR-2 coding style, including:

  • Using only <?php tags
  • Normalizing PHP keywords
  • Standardizing naming conventions
  • Facilitating autoloading capabilities
  • Adding missing visibility
  • Normalizing indentation and spacing
  • Adhering to PHP coding best-practices

Still have questions? Message @laravelshift on Twitter or email shift@laravelshift.com.