PHP code example of drew / debug-statements-fixers

1. Go to this page and download the library: Download drew/debug-statements-fixers 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/ */

    

drew / debug-statements-fixers example snippets


    # .php_cs.dist
    
    
    $finder = PhpCsFixer\Finder::create()
        ->in([__DIR__.'/src', __DIR__.'/tests']);

    return PhpCsFixer\Config::create()
        ->setRules([
            //any fixers you would like to have
            'RemoveDebugStatements/dump' => true,
        ])
        ->registerCustomFixers([new Drew\DebugStatementsFixers\Dump()])
        ->setRiskyAllowed(true)
        ->setFinder($finder);    
    
bash
$ php vendor/bin/php-cs-fixer fix --diff --dry-run -v