aboutsummaryrefslogtreecommitdiffstats
path: root/.phpcs.xml
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2024-05-10 22:20:04 +0200
committerHarald Eilertsen <haraldei@anduin.net>2024-05-10 22:20:04 +0200
commitf9efecf8cc07feef3a20e8692576ab8d0c526c09 (patch)
treec8ebf24a8cf1197051d79fa9fb0be511331ec311 /.phpcs.xml
parent6751f0b78043233aa89f72b6ebb24fb208e71a04 (diff)
downloadhubzilla-ddev-main.tar.gz
hubzilla-ddev-main.tar.bz2
hubzilla-ddev-main.zip
Update config, phpunit and phpcsmain
Diffstat (limited to '.phpcs.xml')
-rw-r--r--.phpcs.xml90
1 files changed, 61 insertions, 29 deletions
diff --git a/.phpcs.xml b/.phpcs.xml
index b1b08f8..fed9f87 100644
--- a/.phpcs.xml
+++ b/.phpcs.xml
@@ -1,36 +1,54 @@
<?xml version="1.0"?>
-<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="PHP_CodeSniffer" xsi:noNamespaceSchemaLocation="phpcs.xsd">
+<ruleset
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ name="PHP_CodeSniffer"
+ xsi:noNamespaceSchemaLocation="phpcs.xsd"
+ >
+
<description>PHP CodeSniffer config for Hubzilla</description>
- <file>boot.php</file>
- <file>index.php</file>
- <file>app</file>
- <file>include</file>
- <file>install</file>
- <file>library</file>
- <file>tests</file>
- <file>util</file>
- <file>vendor</file>
- <file>view</file>
- <file>Zotlabs</file>
+ <file>core/app</file>
+ <file>core/boot.php</file>
+ <file>core/include</file>
+ <file>core/index.php</file>
+ <file>core/install</file>
+ <file>core/library</file>
+ <file>core/tests</file>
+ <file>core/util</file>
+ <file>core/view</file>
+ <file>core/Zotlabs</file>
- <rule ref="Generic">
- <exclude name="Generic.Arrays.ArrayIndent"/>
- <exclude name="Generic.Arrays.DisallowLongArraySyntax"/>
- <exclude name="Generic.Arrays.DisallowShortArraySyntax"/>
- <exclude name="Generic.Files.EndFileNoNewline"/>
- <exclude name="Generic.Files.LowercasedFilename"/>
- <exclude name="Generic.Formatting.MultipleStatementAlignment"/>
- <exclude name="Generic.Formatting.SpaceAfterNot"/>
- <exclude name="Generic.Functions.FunctionCallArgumentSpacing"/>
- <exclude name="Generic.Functions.OpeningFunctionBraceBsdAllman"/>
- <exclude name="Generic.NamingConventions.CamelCapsFunctionName"/>
- <exclude name="Generic.PHP.ClosingPHPTag"/>
- <exclude name="Generic.PHP.RequireStrictTypes"/>
- <exclude name="Generic.PHP.UpperCaseConstant"/>
- <exclude name="Generic.WhiteSpace.DisallowTabIndent"/>
- <exclude name="Generic.WhiteSpace.ScopeIndent"/>
- </rule>
+ <rule ref="Generic">
+ <exclude name="Generic.Arrays.ArrayIndent"/>
+ <exclude name="Generic.Arrays.DisallowLongArraySyntax"/>
+ <exclude name="Generic.Arrays.DisallowShortArraySyntax"/>
+ <exclude name="Generic.Files.EndFileNoNewline"/>
+ <exclude name="Generic.Files.LowercasedFilename"/>
+ <exclude name="Generic.Formatting.MultipleStatementAlignment"/>
+ <exclude name="Generic.Formatting.SpaceAfterNot"/>
+ <exclude name="Generic.Functions.FunctionCallArgumentSpacing"/>
+ <exclude name="Generic.Functions.OpeningFunctionBraceBsdAllman"/>
+ <exclude name="Generic.NamingConventions.CamelCapsFunctionName"/>
+ <exclude name="Generic.PHP.ClosingPHPTag"/>
+ <exclude name="Generic.PHP.RequireStrictTypes"/>
+ <exclude name="Generic.PHP.UpperCaseConstant"/>
+ <exclude name="Generic.WhiteSpace.DisallowTabIndent"/>
+ <exclude name="Generic.WhiteSpace.ScopeIndent"/>
+ <exclude name="Generic.Commenting.DocComment.ContentAfterOpen"/>
+ <exclude name="Generic.Commenting.DocComment.ContentBeforeClose"/>
+ <exclude name="Generic.Commenting.DocComment.LongNotCapital"/>
+ <exclude name="Generic.Commenting.DocComment.MissingShort"/>
+ <exclude name="Generic.Commenting.DocComment.NonParamGroup"/>
+ <exclude name="Generic.Commenting.DocComment.ParamNotFirst"/>
+ <exclude name="Generic.Commenting.DocComment.ShortNotCapital"/>
+ <exclude name="Generic.Commenting.DocComment.SpacingAfter"/>
+ <exclude name="Generic.Commenting.DocComment.SpacingBeforeShort"/>
+ <exclude name="Generic.Commenting.DocComment.TagValueIndent"/>
+ <exclude name="Generic.ControlStructures.InlineControlStructure.NotAllowed"/>
+ <exclude name="Generic.Files.OneClassPerFile.MultipleFound"/>
+ <exclude name="Generic.Files.OneObjectStructurePerFile.MultipleFound"/>
+ <exclude name="Generic.Formatting.SpaceAfterCast.NoSpace"/>
+ </rule>
<!--
Warn about lines longer than 120 columns, lines longer than 150
@@ -43,4 +61,18 @@
</properties>
</rule>
+ <!--
+ Mark deprecated functions.
+ -->
+ <rule ref="Generic.PHP.DeprecatedFunctions">
+ <properties>
+ <property name="forbiddenFunctions" type="array" extend="true">
+ <element key="load_config" value="Zotlabs\Lib\Config::Load" />
+ <element key="get_config" value="Zotlabs\Lib\Config::Get" />
+ <element key="set_config" value="Zotlabs\Lib\Config::Set" />
+ <element key="del_config" value="Zotlabs\Lib\Config::Delete" />
+ </property>
+ </properties>
+ </rule>
+
</ruleset>