3$finder = PhpCsFixer\Finder::create()
5 ->in(__DIR__ .
'/tests');
7return (
new PhpCsFixer\Config)
8 ->setRiskyAllowed(
true)
10 'align_multiline_comment' => [
11 'comment_type' =>
'phpdocs_only'
13 'array_indentation' =>
true,
17 'binary_operator_spaces' => [
18 'default' =>
'single_space'
20 'blank_line_after_namespace' =>
true,
21 'blank_line_after_opening_tag' =>
true,
22 'blank_line_before_statement' => [
33 'declare_strict_types' =>
true,
35 'fully_qualified_strict_types' =>
true,
36 'global_namespace_import' => [
37 'import_constants' =>
true,
38 'import_functions' =>
true,
39 'import_classes' =>
null,
42 'header' => <<<COMMENT
43This file is part of RakLib.
44Copyright (C) 2014-2022 PocketMine Team <https://github.com/pmmp/RakLib>
46RakLib is not affiliated with Jenkins Software LLC nor RakNet.
48RakLib is free software: you can redistribute it and/or modify
49it under the terms of the GNU General Public License as published by
50the Free Software Foundation, either version 3 of the License, or
51(at your option) any later version.
53 'location' =>
'after_open',
55 'indentation_type' =>
true,
56 'native_function_invocation' => [
57 'scope' =>
'namespaced',
58 'include' => [
'@all'],
60 'no_closing_tag' =>
true,
61 'no_empty_phpdoc' =>
true,
62 'no_extra_blank_lines' =>
true,
63 'no_superfluous_phpdoc_tags' => [
64 'allow_mixed' =>
true,
66 'no_trailing_whitespace' =>
true,
67 'no_trailing_whitespace_in_comment' =>
true,
68 'no_whitespace_in_blank_line' =>
true,
69 'no_unused_imports' =>
true,
70 'ordered_imports' => [
76 'sort_algorithm' =>
'alpha'
78 'phpdoc_line_span' => [
79 'property' =>
'single',
83 'phpdoc_trim' =>
true,
84 'phpdoc_trim_consecutive_blank_line_separation' =>
true,
85 'return_type_declaration' => [
86 'space_before' =>
'one'
88 'single_blank_line_at_eof' =>
true,
89 'single_import_per_statement' =>
true,
90 'strict_param' =>
true,
91 'unary_operator_spaces' =>
true,
95 ->setLineEnding(
"\n");