PHP code example of christianjbrown / code-quality-scripts

1. Go to this page and download the library: Download christianjbrown/code-quality-scripts 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/ */

    

christianjbrown / code-quality-scripts example snippets

json
{
    "scripts": {
        "check-style": [
          "clear && ./bin/php-cs ./src ./tests"
        ],
        "check-style-diff": [
          "clear && ./bin/php-cs-diff"
        ],
        "fix-style": [
          "clear && ./bin/php-cs-fix ./src ./tests"
        ],
        "fix-style-diff": [
          "clear && ./bin/php-cs-fix-diff"
        ]
    },
    "config": {
        "bin-dir": "bin"
    }
}

shell
php-cs [<filename or directory>]
shell
php-cs-diff [since-ref]
shell
php-cs-fix [<filename or directory>]
shell
php-cs-fix-diff [since-ref]
shell
XDEBUG_MODE=coverage ./bin/phpunit --coverage-text=.phpunit.cache/coverage.txt
php-coverage-check .phpunit.cache/coverage.txt [minimum-percent]