Skip to content

Commit

Permalink
chore: updating code style
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavs-gutmanis committed May 20, 2022
1 parent 4c82659 commit 328b24c
Show file tree
Hide file tree
Showing 12 changed files with 16,908 additions and 9,748 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ npm-debug.log
.php_cs.cache
cghooks.lock


.php-cs-fixer.cache
9 changes: 5 additions & 4 deletions .php_cs.dist → .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,21 @@
$finder = PhpCsFixer\Finder::create()
->in(__DIR__ . '/packages/plugin');

return PhpCsFixer\Config::create()
return (new PhpCsFixer\Config())
->setRules([
'@Symfony' => true,
'@Symfony:risky' => true,
'@PHPUnit75Migration:risky' => true,
'@PhpCsFixer' => true,
'protected_to_private' => false,
'combine_nested_dirname' => true,
'array_syntax' => ['syntax' => 'short'],
'array_indentation' => true,
'array_syntax' => ['syntax' => 'short'],
'combine_nested_dirname' => true,
'linebreak_after_opening_tag' => true,
'list_syntax' => ['syntax' => 'long'],
'protected_to_private' => false,
'single_trait_insert_per_statement' => true,
'ternary_to_null_coalescing' => true,
'visibility_required' => ['elements' => ['property', 'method']],
])
->setRiskyAllowed(true)
->setFinder($finder);
8 changes: 7 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
},
"require-dev": {
"phpunit/phpunit": "^9.3.0",
"friendsofphp/php-cs-fixer": "^2.16",
"friendsofphp/php-cs-fixer": "^v3.8.0",
"brainmaestro/composer-git-hooks": "^2.8"
},
"autoload": {
Expand Down Expand Up @@ -62,5 +62,11 @@
"composer run fix:dry-run || (printf \"\\e[41mCS Fixer found issues\\e[0m\\n\" && exit 1)"
]
}
},
"config": {
"allow-plugins": {
"yiisoft/yii2-composer": true,
"craftcms/plugin-installer": true
}
}
}
Loading

0 comments on commit 328b24c

Please sign in to comment.