3 * @copyright Copyright (C) 2010-2024, the Friendica project
5 * @license GNU AGPL version 3 or any later version
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Affero General Public License as
9 * published by the Free Software Foundation, either version 3 of the
10 * License, or (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU Affero General Public License for more details.
17 * You should have received a copy of the GNU Affero General Public License
18 * along with this program. If not, see <https://www.gnu.org/licenses/>.
21 declare(strict_types=1);
23 $finder = PhpCsFixer\Finder::create()
33 ->notPath('view/asset')
35 ->notPath('view/smarty3/compiled');
37 $config = new PhpCsFixer\Config();
43 'align_multiline_comment' => true,
44 'array_indentation' => true,
48 'binary_operator_spaces' => [
49 'default' => 'single_space',
51 '=>' => 'align_single_space_minimal',
52 '=' => 'align_single_space_minimal',
53 '??' => 'align_single_space_minimal',
56 'blank_line_after_namespace' => true,
58 'position_after_anonymous_constructs' => 'same',
59 'position_after_control_structures' => 'same',
60 'position_after_functions_and_oop_constructs' => 'next',
64 'full_opening_tag' => true,
65 'function_declaration' => [
66 'closure_function_spacing' => 'one',
68 'indentation_type' => true,
69 'line_ending' => true,
73 'lowercase_keywords' => true,
74 'method_argument_space' => [],
75 'no_closing_tag' => true,
76 'no_spaces_after_function_name' => true,
77 'no_spaces_inside_parenthesis' => true,
78 'no_trailing_whitespace' => true,
79 'no_trailing_whitespace_in_comment' => true,
80 'no_unused_imports' => true,
81 'single_blank_line_at_eof' => true,
82 'single_class_element_per_statement' => true,
83 'single_import_per_statement' => true,
84 'single_line_after_imports' => true,
85 'switch_case_space' => true,
86 'ternary_operator_spaces' => false,
87 'visibility_required' => [
88 'elements' => ['property', 'method']
90 'new_with_braces' => true,