Repository navigation
Expand file tree
/
Copy pathphpcs.xml
More file actions
92 lines (85 loc) · 5 KB
/
Copy pathphpcs.xml
File metadata and controls
92 lines (85 loc) · 5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<?xml version="1.0" encoding="UTF-8"?>
<ruleset name="artwork-rules">
<description>Ruleset for the artwork project</description>
<!-- Files/Directories to check -->
<file>app</file>
<file>artwork</file>
<file>tests/Unit</file>
<file>config</file>
<file>database</file>
<file>routes</file>
<!-- Excluded files/directories -->
<exclude-pattern>./config/debugbar.php</exclude-pattern>
<!-- Vendor-veröffentlichte Konfiguration (Tabs, lange Zeilen) — nicht unser Stil -->
<exclude-pattern>./config/clockwork.php</exclude-pattern>
<exclude-pattern>./database/migrations/</exclude-pattern>
<exclude-pattern>storage/</exclude-pattern>
<exclude-pattern>vendor/</exclude-pattern>
<exclude-pattern>node_modules/</exclude-pattern>
<exclude-pattern>**/*.js</exclude-pattern>
<exclude-pattern>**/*.vue</exclude-pattern>
<!-- Warnungen werden gemeldet, brechen die Pipeline aber nicht (Errors schon) -->
<config name="ignore_warnings_on_exit" value="1"/>
<!-- PSR standard -->
<rule ref="PSR12">
<exclude name="PSR12.Classes.OpeningBraceSpace" />
</rule>
<!-- Testmethoden heißen im Projekt bewusst snake_case (Feature-Tests werden gar nicht geprüft) -->
<rule ref="PSR1.Methods.CamelCapsMethodName">
<exclude-pattern>./tests/Unit/</exclude-pattern>
</rule>
<!-- Laravel coding style: ab 120 Zeichen Warnung, ab 160 Fehler -->
<rule ref="Generic.Files.LineLength">
<properties>
<property name="lineLimit" value="120" />
<property name="absoluteLineLimit" value="160" />
</properties>
</rule>
<!-- SlevomatCodingStandard rules -->
<rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint" />
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingNativeTypeHint" />
<rule ref="SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingNativeTypeHint" />
<rule ref="SlevomatCodingStandard.Classes.PropertyDeclaration.Scope" />
<rule ref="SlevomatCodingStandard.Classes.SuperfluousAbstractClassNaming">
<!-- Bestandsklasse, an 20 Stellen referenziert — Umbenennung lohnt den Churn nicht -->
<exclude-pattern>./artwork/Modules/Shift/RuleChecks/AbstractRuleCheck.php</exclude-pattern>
</rule>
<!-- Additional rules -->
<rule ref="Generic.Classes.DuplicateClassName"/>
<!-- Leere catch-Blöcke mit erklärendem Kommentar sind hier bewusstes Defensiv-Muster -->
<rule ref="Generic.CodeAnalysis.EmptyStatement">
<exclude name="Generic.CodeAnalysis.EmptyStatement.DetectedCatch"/>
</rule>
<rule ref="Generic.CodeAnalysis.ForLoopShouldBeWhileLoop"/>
<!-- ForLoopWithTestFunctionCall entfernt: schlägt bei jeder Carbon-Datumsschleife
(for ($day = …; $day->lte($end); $day->addDay())) an; count()-Aufrufe im Schleifenkopf sind bereinigt -->
<rule ref="Generic.CodeAnalysis.JumbledIncrementer"/>
<rule ref="Generic.CodeAnalysis.UnconditionalIfStatement"/>
<rule ref="Generic.CodeAnalysis.UnnecessaryFinalModifier"/>
<!-- Unbenutzte Parameter nur dort melden, wo die Signatur frei ist: bei Interface-/Elternklassen-Implementierungen
und Policies (Laravel ruft mit fester Signatur) lässt sich der Parameter nicht entfernen -->
<rule ref="Generic.CodeAnalysis.UnusedFunctionParameter">
<exclude name="Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass"/>
<exclude name="Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClassBeforeLastUsed"/>
<exclude name="Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClassAfterLastUsed"/>
<exclude name="Generic.CodeAnalysis.UnusedFunctionParameter.FoundInImplementedInterface"/>
<exclude name="Generic.CodeAnalysis.UnusedFunctionParameter.FoundInImplementedInterfaceBeforeLastUsed"/>
<exclude name="Generic.CodeAnalysis.UnusedFunctionParameter.FoundInImplementedInterfaceAfterLastUsed"/>
<exclude-pattern>*/Policies/*</exclude-pattern>
<exclude-pattern>./database/factories/</exclude-pattern>
<exclude-pattern>./routes/channels.php</exclude-pattern>
</rule>
<rule ref="Generic.CodeAnalysis.UselessOverridingMethod"/>
<rule ref="Generic.ControlStructures.InlineControlStructure"/>
<rule ref="Generic.Formatting.DisallowMultipleStatements"/>
<!-- Komplexitäts-/Nesting-Metriken nicht mehr im Sniff: 256 Bestandsfunktionen lagen darüber (Stand 15.09.2026),
das Signal ging im Rauschen unter. Refactoring-Kandidaten sind in der Projektnotiz festgehalten. -->
<rule ref="Generic.PHP.DeprecatedFunctions"/>
<rule ref="Generic.PHP.DisallowShortOpenTag"/>
<rule ref="Generic.PHP.NoSilencedErrors"/>
<rule ref="MySource.PHP.EvalObjectFactory"/>
<rule ref="PEAR.Classes.ClassDeclaration"/>
<rule ref="Squiz.PHP.Eval"/>
<!-- Rechte-Katalog: lange Übersetzungsschlüssel als Strings, keine Zeilenumbrüche im Text -->
<exclude-pattern>artwork/Modules/Permission/Catalog/Modules/*</exclude-pattern>
</ruleset>