]> git.localhorst.tv Git - alttp.git/commitdiff
add php linter configs
authorDaniel Karbach <daniel.karbach@localhorst.tv>
Sat, 5 Jul 2025 14:41:12 +0000 (16:41 +0200)
committerDaniel Karbach <daniel.karbach@localhorst.tv>
Sat, 5 Jul 2025 14:41:12 +0000 (16:41 +0200)
.phpactor.json [new file with mode: 0644]
.phpcs.xml [new file with mode: 0644]

diff --git a/.phpactor.json b/.phpactor.json
new file mode 100644 (file)
index 0000000..c375975
--- /dev/null
@@ -0,0 +1,6 @@
+{
+       "language_server.diagnostic_ignore_codes": [
+               "worse.assignment_to_missing_property",
+               "worse.docblock_missing_return_type"
+       ]
+}
diff --git a/.phpcs.xml b/.phpcs.xml
new file mode 100644 (file)
index 0000000..785939d
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="PHP_CodeSniffer" xsi:noNamespaceSchemaLocation="phpcs.xsd">
+       <rule ref="PSR1">
+               <exclude name="PSR1.Methods.CamelCapsMethodName.NotCamelCaps" />
+       </rule>
+       <rule ref="PSR2">
+               <exclude name="Generic.WhiteSpace.DisallowTabIndent" />
+               <exclude name="PSR2.Classes.ClassDeclaration.OpenBraceNewLine" />
+               <exclude name="PSR2.Classes.ClassDeclaration.CloseBraceAfterBody" />
+               <exclude name="Squiz.Functions.MultiLineFunctionDeclaration.BraceOnSameLine" />
+       </rule>
+</ruleset>