PHP code example of clivern / phpcs
1. Go to this page and download the library: Download clivern/phpcs 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/ */
clivern / phpcs example snippets
declare(strict_types=1);
use Clivern\CodingStandards\Rules;
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
$fileHeaderComment = <<<COMMENT
This file is part of Clivern/phpcs - PHP Coding Standards
(c) Clivern <[email protected]>
COMMENT;
$finder = Finder::create()
->name('.php_cs.dist')
->in(__DIR__)
->exclude('vendor');
$overrides = [
'declare_strict_types' => true,
];
return (new Config())
->setFinder($finder)
->setRiskyAllowed(true)
->setRules(Rules::PHP72($fileHeaderComment, $overrides));