PHP code example of brekitomasson / php-cs-fixer-breki-config
1. Go to this page and download the library: Download brekitomasson/php-cs-fixer-breki-config 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/ */
brekitomasson / php-cs-fixer-breki-config example snippets
use BrekiTomasson\PhpCsFixer\Config\Exceptions\InvalidPhpVersion;
use BrekiTomasson\PhpCsFixer\Config\Factory;
use BrekiTomasson\PhpCsFixer\Config\RuleSet\Php8;
$ruleSet = new Php8();
try {
$configuration = Factory::fromRuleSet($ruleSet);
$configuration->getFinder()->in(__DIR__ . '/' . 'src');
$configuration->setCacheFile(__DIR__ . '/.build/php-cs-fixer/php-cs-fixer.cache');
return $configuration;
} catch (InvalidPhpVersion $exception) {
echo 'Failed to generate php-cs-fixer configuration: ' . $exception->getMessage() . PHP_EOL;
}