Adopt the PSR-2 Code Style

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 support@laravelshift.com.

Sign in with any of the following services to connect Shift with your Laravel project.


Don't use one of these services?

Temporarily push your project to a free, private repository on one of these cloud-based services or upgrade your project locally with Shift for Docker.