Skip to content

Instantly share code, notes, and snippets.

@ChristianOellers
Created June 11, 2023 16:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ChristianOellers/870a41cbda9e441560569953e390cb97 to your computer and use it in GitHub Desktop.
Save ChristianOellers/870a41cbda9e441560569953e390cb97 to your computer and use it in GitHub Desktop.
Symfony - PHPCS config (via Squizlabs), PSR-12 standard.
<?xml version="1.0" encoding="UTF-8"?>
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="vendor/squizlabs/php_codesniffer/phpcs.xsd">
<arg name="basepath" value="." />
<arg name="cache" value=".phpcs-cache" />
<arg name="extensions" value="php" />
<arg name="colors" />
<arg name="report" value="summary" />
<!-- p = Show progress, s = Show sniff codes, v = Verbose -->
<arg value="psv" />
<!-- Check file type only -->
<!-- <arg name="extensions" value="php" /> -->
<!-- Included -->
<file>bin/</file>
<file>config/</file>
<file>public/</file>
<file>src/</file>
<file>templates/</file>
<file>tests/</file>
<file>translations/</file>
<file>web/</file>
<!-- Excluded -->
<exclude-pattern>.idea/</exclude-pattern>
<exclude-pattern>.vagrant/</exclude-pattern>
<exclude-pattern>.vscode/</exclude-pattern>
<exclude-pattern>node_modules/</exclude-pattern>
<exclude-pattern>var/</exclude-pattern>
<exclude-pattern>vendor/</exclude-pattern>
<!-- Rules + Exclusions -->
<rule ref="PSR12">
<exclude name="Generic.Files.LineLength" />
</rule>
</ruleset>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment