PHP code example of paqtcom / coding-standards

1. Go to this page and download the library: Download paqtcom/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/ */

    

paqtcom / coding-standards example snippets




$finder = PhpCsFixer\Finder::create()
    ->in(__DIR__)
    ->path([
        '/^app/',
        '/^src/',
        ...
    ]);

/** @var PhpCsFixer\Config $config */
$config = 

return $config->setFinder($finder)
    ->setRules(
        array_merge($config->getRules(), [
            'no_space_around_double_colon' => false,
        ])
    );
xml
<rule ref="vendor/paqtcom/coding-standards/rules/phpmd.xml" />

<rule ref="rulesets/codesize.xml/CyclomaticComplexity">
    <priority>1</priority>
    <properties>
        <property name="reportLevel" value="5" />
    </properties>
</rule>

<rule ref="rulesets/naming.xml">
    <exclude name="LongVariable" />
</rule>