Skip to content

Commit

Permalink
Add a starter PHPCS file
Browse files Browse the repository at this point in the history
  • Loading branch information
Sephster committed Oct 25, 2023
1 parent ef5ea77 commit 68cf217
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions phpcs.xml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0"?>
<ruleset
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/squizlabs/php_codesniffer/phpcs.xsd"
>
<arg name="basepath" value="." />
<arg name="extensions" value="php" />
<arg name="parallel" value="80" />
<arg name="colors" />
<arg name="cache" value=".phpcs.cache" />
<arg value="p" />

<file>src</file>
<file>tests</file>

<rule ref="PSR12">
<exclude name="Generic.Files.LineLength.TooLong" />
</rule>

<config name="installed_paths" value="../../slevomat/coding-standard" />
<rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes">
<properties>
<property name="newlinesCountBetweenOpenTagAndDeclare" type="int" value="2" />
<property name="spacesCountAroundEqualsSign" type="int" value="0" />
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly" />
<rule ref="SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses" />
<rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHint" />
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHint" />
<rule ref="SlevomatCodingStandard.TypeHints.PropertyTypeHint" />
<rule ref="SlevomatCodingStandard.Commenting.EmptyComment" />
<rule ref="SlevomatCodingStandard.Classes.RequireConstructorPropertyPromotion" />
</ruleset>

0 comments on commit 68cf217

Please sign in to comment.