Skip to content

Commit

Permalink
feat: add cs-diff to composer.json
Browse files Browse the repository at this point in the history
  • Loading branch information
albertcht committed Aug 10, 2023
1 parent 6de17a0 commit 7943610
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 14 deletions.
14 changes: 0 additions & 14 deletions .php-cs-fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,6 @@
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/
$header = <<<'EOF'
This file is part of Hyperf.
@link https://www.hyperf.io
@document https://hyperf.wiki
@contact group@hyperf.io
@license https://github.com/hyperf/hyperf/blob/master/LICENSE
EOF;

return (new PhpCsFixer\Config())
->setRiskyAllowed(true)
Expand All @@ -25,12 +17,6 @@
'@Symfony' => true,
'@DoctrineAnnotation' => true,
'@PhpCsFixer' => true,
'header_comment' => [
'comment_type' => 'PHPDoc',
'header' => $header,
'separate' => 'none',
'location' => 'after_declare_strict',
],
'array_syntax' => [
'syntax' => 'short',
],
Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@
"rm -rf runtime/container"
],
"test": "co-phpunit --prepend tests/bootstrap.php -c phpunit.xml --colors=always",
"cs-diff": "php-cs-fixer fix --path-mode=intersection `git diff --name-only --diff-filter=ACMRTUXB origin/master..HEAD`",
"cs-fix": "php-cs-fixer fix $1",
"analyse": "phpstan analyse --memory-limit 300M -l 0 -c phpstan.neon ./app ./config",
"start": [
Expand Down

0 comments on commit 7943610

Please sign in to comment.