mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 01:25:55 +02:00
Added an PHP CS fixer config file and applied it to files.
We now use the same the same style as the symfony project, and it allows us to simply fix the style by executing php_cs_fixer fix in the project root.
This commit is contained in:
parent
89258bc102
commit
e557bdedd5
210 changed files with 2099 additions and 2742 deletions
30
.php_cs.dist
Normal file
30
.php_cs.dist
Normal file
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Based on the .php_cs.dist of the symfony project
|
||||
* https://github.com/symfony/symfony/blob/4.4/.php_cs.dist
|
||||
*/
|
||||
|
||||
if (!file_exists(__DIR__.'/src')) {
|
||||
exit(0);
|
||||
}
|
||||
|
||||
return PhpCsFixer\Config::create()
|
||||
->setRules([
|
||||
'@Symfony' => true,
|
||||
'@Symfony:risky' => true,
|
||||
'@PHPUnit75Migration:risky' => true,
|
||||
'php_unit_dedicate_assert' => ['target' => '5.6'],
|
||||
'array_syntax' => ['syntax' => 'short'],
|
||||
'fopen_flags' => false,
|
||||
'protected_to_private' => false,
|
||||
'combine_nested_dirname' => true,
|
||||
])
|
||||
->setRiskyAllowed(true)
|
||||
->setFinder(
|
||||
PhpCsFixer\Finder::create()
|
||||
->in(__DIR__.'/src')
|
||||
->in(__DIR__.'/tests')
|
||||
->append([__FILE__])
|
||||
)
|
||||
;
|
Loading…
Add table
Add a link
Reference in a new issue