Skip to content

Instantly share code, notes, and snippets.

@inhere
Created January 23, 2018 01:32
Show Gist options
  • Save inhere/91fd338dfec8229ff0a37ef100f2e865 to your computer and use it in GitHub Desktop.
Save inhere/91fd338dfec8229ff0a37ef100f2e865 to your computer and use it in GitHub Desktop.
the scripts config for composer
"scripts": {
"analyze": [
"@cs:check",
"@phpstan",
"@composer validate --strict"
],
"phpstan": [
"wget -nc https://github.com/phpstan/phpstan/releases/download/0.9.1/phpstan.phar",
"chmod a+x phpstan.phar",
"./phpstan.phar analyse src tests --level=2 -c phpstan.neon --no-interaction --no-progress"
],
"cs:check": [
"wget -nc http://cs.sensiolabs.org/download/php-cs-fixer-v2.phar",
"chmod a+x php-cs-fixer-v2.phar",
"./php-cs-fixer-v2.phar fix --config=.php_cs.dist -v --dry-run --stop-on-violation --using-cache=no --allow-risky=yes"
],
"cs:fix": [
"./php-cs-fixer-v2.phar fix --config=.php_cs.dist -v --allow-risky=yes"
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment