Files
firefly-iii/.ci/php-cs-fixer/.php-cs-fixer.php

45 lines
1.4 KiB
PHP
Raw Normal View History

2022-10-30 12:21:41 +01:00
<?php
/*
* .php-cs-fixer.php
* Copyright (c) 2022 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
2022-12-29 19:41:57 +01:00
$current = __DIR__;
$paths = [
2023-03-18 14:47:35 +01:00
$current.'/../../app',
$current.'/../../config',
$current.'/../../database',
$current.'/../../routes',
$current.'/../../tests',
$current.'/../../resources/lang',
2022-12-29 19:41:57 +01:00
];
$finder = PhpCsFixer\Finder::create()
->in($paths);
2022-10-30 12:21:41 +01:00
$config = new PhpCsFixer\Config();
return $config->setRules([
2023-03-18 14:47:35 +01:00
'@PSR12' => true,
'declare_strict_types' => true,
'strict_param' => true,
'array_syntax' => ['syntax' => 'short'],
2022-10-30 12:21:41 +01:00
])
2023-03-18 14:47:35 +01:00
->setFinder($finder);