PHP code example of tareq1988 / wp-php-cs-fixer
1. Go to this page and download the library: Download tareq1988/wp-php-cs-fixer 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/ */
tareq1988 / wp-php-cs-fixer example snippets
diff
// add the custom fixers
+ )
->exclude('node_modules')
->exclude('vendors')
->in( __DIR__ )
;
$config = new PhpCsFixer\Config();
$config
+ ->registerCustomFixers([
+ new WeDevs\Fixer\SpaceInsideParenthesisFixer(),
+ new WeDevs\Fixer\BlankLineAfterClassOpeningFixer()
+ ])
+ ->setRules( WeDevs\Fixer\Fixer::rules() )
->setFinder( $finder )
;
return $config;