PHP code example of travelopia / wordpress-coding-standards

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

    

travelopia / wordpress-coding-standards example snippets



use PhpCsFixer\Finder;
use Travelopia\WordPressCodingStandards\TravelopiaFixersConfig;

$finder = Finder::create()
    ->in( __DIR__ )
    ->name( '*.php' )
    ->exclude( 'vendor' )
    ->ignoreVCS( true );

$config = TravelopiaFixersConfig::create()
    ->setRiskyAllowed( true )
    ->setIndent( "\t" )
    ->setLineEnding( "\n" )
    ->setRules( TravelopiaFixersConfig::getRules() )
    ->setFinder( $finder );

return $config;