mailgun-php/.php-cs-fixer.php
Oleksandr Mykhailenko be083541bf
Update php-cs-fixer. Fix code style issues (#833)
Signed-off-by: Alexander Mykhailenko <mihaskep@gmail.com>

Update php-cs-fixer. Fix code style issues

Signed-off-by: Alexander Mykhailenko <mihaskep@gmail.com>

Fix tests

Signed-off-by: Alexander Mykhailenko <mihaskep@gmail.com>

Fix test

Signed-off-by: Alexander Mykhailenko <mihaskep@gmail.com>

Prevent Uncaught InvalidArgumentException

Signed-off-by: Alexander Mykhailenko <mihaskep@gmail.com>
2022-07-23 18:26:03 +03:00

36 lines
929 B
PHP

<?php
$header = <<<TXT
Copyright (C) 2013 Mailgun
This software may be modified and distributed under the terms
of the MIT license. See the LICENSE file for details.
TXT;
$finder = PhpCsFixer\Finder::create()
->in('src')
->in('tests');
return (new PhpCsFixer\Config())
->setRiskyAllowed(true)
->setRules([
'@PSR2' => true,
'@Symfony' => true,
'strict_param' => true,
'array_syntax' => ['syntax' => 'short'],
'declare_strict_types' => true,
'no_empty_phpdoc' => false,
'no_superfluous_phpdoc_tags' => false,
'phpdoc_separation' => false,
'no_unneeded_final_method' => false, # prevent phpstan divergence
'header_comment' => [
'comment_type' => 'comment',
'header' => $header,
'location' => 'after_declare_strict',
'separate' => 'both',
],
])
->setFinder($finder)
;