Skip to content

Commit

Permalink
chore: Introduce php-cs-fixer
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephan Huber committed Dec 8, 2024
1 parent 7494d2c commit d6368fa
Show file tree
Hide file tree
Showing 6 changed files with 1,624 additions and 492 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,12 @@ tests/test-alter/
tests/test-scaffold-callback/
tests/test-scaffold-twig
.obsidian
<<<<<<< HEAD
tests/assets/script-tests/crypto/decrypted
tests/assets/script-tests/crypto/encrypted
tests/assets/k8s-command/kube/
.phpunit.result.cache

###> friendsofphp/php-cs-fixer ###
/.php-cs-fixer.php
/.php-cs-fixer.cache
###< friendsofphp/php-cs-fixer ###
13 changes: 13 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

$finder = (new PhpCsFixer\Finder())
->in(__DIR__)
->exclude('var')
;

return (new PhpCsFixer\Config())
->setRules([
'@Symfony' => true,
])
->setFinder($finder)
;
3 changes: 2 additions & 1 deletion .phpactor.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
"$schema": "/phpactor.schema.json",
"language_server_phpstan.enabled": true,
"php_code_sniffer.enabled": true,
"prophecy.enabled": true
"prophecy.enabled": true,
"language_server_php_cs_fixer.enabled": false
}
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@
"phpstan/phpstan-symfony": "^1.0",
"phpspec/prophecy-phpunit": "^2.0",
"phpro/grumphp-shim": "^2",
"jangregor/phpstan-prophecy": "^1.0"
"jangregor/phpstan-prophecy": "^1.0",
"friendsofphp/php-cs-fixer": "^3.65"
},
"autoload": {
"psr-4": {
Expand Down
Loading

0 comments on commit d6368fa

Please sign in to comment.