2016-10-15 03:20:46 +03:00
|
|
|
<?php
|
|
|
|
|
2019-01-07 08:12:53 +03:00
|
|
|
$header = <<<TXT
|
|
|
|
Copyright (C) 2013 Mailgun
|
2016-10-15 03:20:46 +03:00
|
|
|
|
2019-01-07 08:12:53 +03:00
|
|
|
This software may be modified and distributed under the terms
|
|
|
|
of the MIT license. See the LICENSE file for details.
|
|
|
|
TXT;
|
2016-10-15 03:20:46 +03:00
|
|
|
|
2019-01-07 08:12:53 +03:00
|
|
|
$finder = PhpCsFixer\Finder::create()
|
|
|
|
->in('src')
|
|
|
|
->in('tests');
|
|
|
|
|
2022-07-23 18:26:03 +03:00
|
|
|
|
|
|
|
return (new PhpCsFixer\Config())
|
2019-01-07 08:12:53 +03:00
|
|
|
->setRiskyAllowed(true)
|
|
|
|
->setRules([
|
|
|
|
'@PSR2' => true,
|
|
|
|
'@Symfony' => true,
|
|
|
|
'strict_param' => true,
|
|
|
|
'array_syntax' => ['syntax' => 'short'],
|
2019-01-09 22:32:09 +03:00
|
|
|
'declare_strict_types' => true,
|
2022-07-23 18:26:03 +03:00
|
|
|
'no_empty_phpdoc' => false,
|
|
|
|
'no_superfluous_phpdoc_tags' => false,
|
|
|
|
'phpdoc_separation' => false,
|
2020-03-31 01:18:19 +03:00
|
|
|
'no_unneeded_final_method' => false, # prevent phpstan divergence
|
2019-01-07 08:12:53 +03:00
|
|
|
'header_comment' => [
|
2022-07-23 18:26:03 +03:00
|
|
|
'comment_type' => 'comment',
|
2019-01-07 08:12:53 +03:00
|
|
|
'header' => $header,
|
|
|
|
'location' => 'after_declare_strict',
|
|
|
|
'separate' => 'both',
|
|
|
|
],
|
|
|
|
])
|
|
|
|
->setFinder($finder)
|
|
|
|
;
|