PocketMine-MP 5.23.3 git-f7687af337d001ddbcc47b8e773f014a33faa662
Loading...
Searching...
No Matches
raklib/.php-cs-fixer.php
1<?php
2
3$finder = PhpCsFixer\Finder::create()
4 ->in(__DIR__ . '/src')
5 ->in(__DIR__ . '/tests');
6
7return (new PhpCsFixer\Config)
8 ->setRiskyAllowed(true)
9 ->setRules([
10 'align_multiline_comment' => [
11 'comment_type' => 'phpdocs_only'
12 ],
13 'array_indentation' => true,
14 'array_syntax' => [
15 'syntax' => 'short'
16 ],
17 'binary_operator_spaces' => [
18 'default' => 'single_space'
19 ],
20 'blank_line_after_namespace' => true,
21 'blank_line_after_opening_tag' => true,
22 'blank_line_before_statement' => [
23 'statements' => [
24 'declare'
25 ]
26 ],
27 'cast_spaces' => [
28 'space' => 'single'
29 ],
30 'concat_space' => [
31 'spacing' => 'one'
32 ],
33 'declare_strict_types' => true,
34 'elseif' => true,
35 'fully_qualified_strict_types' => true,
36 'global_namespace_import' => [
37 'import_constants' => true,
38 'import_functions' => true,
39 'import_classes' => null,
40 ],
41 'header_comment' => [
42 'header' => <<<COMMENT
43This file is part of RakLib.
44Copyright (C) 2014-2022 PocketMine Team <https://github.com/pmmp/RakLib>
45
46RakLib is not affiliated with Jenkins Software LLC nor RakNet.
47
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.
52COMMENT,
53 'location' => 'after_open',
54 ],
55 'indentation_type' => true,
56 'native_function_invocation' => [
57 'scope' => 'namespaced',
58 'include' => ['@all'],
59 ],
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,
65 ],
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' => [
71 'imports_order' => [
72 'class',
73 'function',
74 'const',
75 ],
76 'sort_algorithm' => 'alpha'
77 ],
78 'phpdoc_line_span' => [
79 'property' => 'single',
80 'method' => null,
81 'const' => null
82 ],
83 'phpdoc_trim' => true,
84 'phpdoc_trim_consecutive_blank_line_separation' => true,
85 'return_type_declaration' => [
86 'space_before' => 'one'
87 ],
88 'single_blank_line_at_eof' => true,
89 'single_import_per_statement' => true,
90 'strict_param' => true,
91 'unary_operator_spaces' => true,
92 ])
93 ->setFinder($finder)
94 ->setIndent("\t")
95 ->setLineEnding("\n");