3$finder = PhpCsFixer\Finder::create()
5 ->in(__DIR__ .
'/tools')
6 ->in(__DIR__ .
'/tests');
8return (
new PhpCsFixer\Config)
9 ->setRiskyAllowed(
true)
11 'align_multiline_comment' => [
12 'comment_type' =>
'phpdocs_only'
14 'array_indentation' =>
true,
18 'binary_operator_spaces' => [
19 'default' =>
'single_space'
21 'blank_line_after_namespace' =>
true,
22 'blank_line_after_opening_tag' =>
true,
23 'blank_line_before_statement' => [
34 'declare_strict_types' =>
true,
36 'fully_qualified_strict_types' =>
true,
37 'global_namespace_import' => [
38 'import_constants' =>
true,
39 'import_functions' =>
true,
40 'import_classes' =>
null,
43 'header' => <<<COMMENT
44This file is part of BedrockProtocol.
45Copyright (C) 2014-2022 PocketMine Team <https://github.com/pmmp/BedrockProtocol>
47BedrockProtocol is free software: you can redistribute it and/or modify
48it under the terms of the GNU Lesser General Public License as published by
49the Free Software Foundation, either version 3 of the License, or
50(at your option) any later version.
52 'location' =>
'after_open',
54 'indentation_type' =>
true,
55 'native_function_invocation' => [
56 'scope' =>
'namespaced',
57 'include' => [
'@all'],
59 'no_closing_tag' =>
true,
60 'no_empty_phpdoc' =>
true,
61 'no_extra_blank_lines' =>
true,
62 'no_superfluous_phpdoc_tags' => [
63 'allow_mixed' =>
true,
65 'no_trailing_whitespace' =>
true,
66 'no_trailing_whitespace_in_comment' =>
true,
67 'no_whitespace_in_blank_line' =>
true,
68 'no_unused_imports' =>
true,
69 'ordered_imports' => [
75 'sort_algorithm' =>
'alpha'
77 'phpdoc_line_span' => [
78 'property' =>
'single',
82 'phpdoc_trim' =>
true,
83 'phpdoc_trim_consecutive_blank_line_separation' =>
true,
84 'return_type_declaration' => [
85 'space_before' =>
'one'
87 'single_blank_line_at_eof' =>
true,
88 'single_import_per_statement' =>
true,
89 'strict_param' =>
true,
90 'unary_operator_spaces' =>
true,
94 ->setLineEnding(
"\n");