PHP code example of arxeiss / coding-standards

1. Go to this page and download the library: Download arxeiss/coding-standards library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

arxeiss / coding-standards example snippets

xml
<rule ref="SlevomatCodingStandard.Files.TypeNameMatchesFileName">
    <properties>
        <property name="rootNamespaces" type="array">
            <element key="app" value="BlogApp"/>
        </property>
    </properties>
</rule>
xml
<rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHint"> <!-- Check correct type hints -->
    <properties>
        <property name="enableMixedTypeHint" value="true"/>
    </properties>
</rule>
<rule ref="SlevomatCodingStandard.TypeHints.PropertyTypeHint"> <!-- Check type hint for class property -->
    <properties>
        <property name="enableMixedTypeHint" value="true"/>
    </properties>
</rule>
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHint"> <!-- Correct return type hint -->
    <properties>
        <property name="enableMixedTypeHint" value="true"/>
    </properties>
</rule>