PHP code example of insiders / php-coding-standards
1. Go to this page and download the library: Download insiders/php-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/ */
insiders / php-coding-standards example snippets
declare(strict_types=1);
use Insiders\PhpCodingStandards\PhpCsFixer\Rules;
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
return (new Config())
->setRules(Rules::getRulesForPHP72())
->setRiskyAllowed(true)
->setFinder(Finder::create()->in(__DIR__))
->setCacheFile('.php-cs-fixer.cache');
bash
./vendor/bin/php-cs-fixer fix