A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.jetbrains.com/help/phpstorm/symfony-code-style-and-coding-standards.html below:

Symfony code style | PhpStorm Documentation

Symfony code style

PhpStorm provides the built-in Symfony2 code style tailored for Symfony development.

Set the Symfony2 code style
  1. In the Settings dialog (Ctrl+Alt+S) , navigate to .

  2. Click the Set from link in the upper-right corner and select the Symfony2 option from the popup menu.

Check code against the Symfony coding standards

With PhpStorm, you can use the PHP_CodeSniffer tool, which detects coding standard issues, in combination with Symfony coding standard, which provides a set of Symfony-specific standards to PHP_CodeSniffer. This will ensure that your code is clean, consistent, and free of some common errors.

To get started, install PHP_CodeSniffer using any technique described in Install and configure PHP_CodeSniffer. Probably the easiest way is to install it with Composer.

Install PHP_CodeSniffer
  1. Inside composer.json, add the squizlabs/php_codesniffer dependency record to the require or require-dev key. To get code completion for the package name and version, press Ctrl+Space.

  2. Do one of the following:

Next, install Symfony coding standard, which will provide Symfony-specific standards to PHP_CodeSniffer.

Install Symfony coding standard
  1. Inside composer.json, add the escapestudios/symfony2-coding-standard dependency record to the require or require-dev key. To get code completion for the package name and version, press Ctrl+Space.

  2. Do one of the following:

The Symfony coding standard package will be installed, and the corresponding Symfony standard will be selected for the PHP_CodeSniffer validation inspection automatically. If necessary, you can further customize the inspection on the page of the Settings dialog (Ctrl+Alt+S) . For more information, refer to Enable PHP_CodeSniffer as a PhpStorm inspection.

22 January 2025


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4