Current File : /home/jvzmxxx/wiki/extensions/Wikibase/phpcs.xml
<?xml version="1.0"?>
<ruleset name="Wikibase">
	<!-- See https://github.com/wikimedia/mediawiki-tools-codesniffer/blob/master/MediaWiki/ruleset.xml -->
	<rule ref="vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
		<exclude name="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment" />
	</rule>

	<rule ref="Generic.Classes.DuplicateClassName.Found">
		<exclude-pattern>DataAccess.Scribunto.Scribunto_LuaWikibaseLibraryTestCase\.php</exclude-pattern>
	</rule>

	<rule ref="Generic.CodeAnalysis.UnconditionalIfStatement">
		<exclude-pattern>WikibaseClient\.example\.php</exclude-pattern>
	</rule>

	<rule ref="Generic.ControlStructures" />

	<rule ref="Generic.Files.InlineHTML" />
	<rule ref="Generic.Files.LineLength">
		<properties>
			<property name="lineLimit" value="140" />
		</properties>
		<!-- Exclude auto-generated files from the Translate extension, see magic-export.php. -->
		<exclude-pattern>\.i18n\.magic\.php</exclude-pattern>
	</rule>
	<rule ref="Generic.Files.OneInterfacePerFile" />
	<rule ref="Generic.Files.OneTraitPerFile" />

	<rule ref="Generic.Metrics.CyclomaticComplexity">
		<properties>
			<property name="complexity" value="16" />
		</properties>
		<exclude-pattern>(RdfWriterFactory|UrlSchemeValidators)\.php</exclude-pattern>
	</rule>
	<rule ref="Generic.Metrics.NestingLevel">
		<properties>
			<property name="nestingLevel" value="5" />
		</properties>
	</rule>

	<rule ref="Generic.PHP.CharacterBeforePHPOpeningTag" />

	<rule ref="PSR1">
		<exclude name="PSR1.Files.SideEffects" />
	</rule>
	<rule ref="PSR1.Classes.ClassDeclaration.MultipleClasses">
		<exclude-pattern>DataAccess.Scribunto.Scribunto_LuaWikibaseLibraryTestCase\.php</exclude-pattern>
	</rule>
	<rule ref="PSR1.Methods.CamelCapsMethodName.NotCamelCaps">
		<!-- Exclude test methods like "testGivenInvalidInput_methodThrowsException". -->
		<exclude-pattern>tests.phpunit*Test*\.php</exclude-pattern>
	</rule>

	<rule ref="PSR2.Files" />

	<rule ref="Squiz.Classes.DuplicateProperty" />
	<rule ref="Squiz.Classes.SelfMemberReference" />
	<!-- This sniff is included in PSR1 but needs an exception. -->
	<rule ref="Squiz.Classes.ValidClassName.NotCamelCaps">
		<exclude-pattern>DataAccess.Scribunto.Scribunto_LuaWikibase*Library</exclude-pattern>
	</rule>
	<rule ref="Squiz.ControlStructures.ControlSignature" />
	<rule ref="Squiz.Functions.FunctionDuplicateArgument" />
	<rule ref="Squiz.Functions.GlobalFunction" />
	<rule ref="Squiz.Scope" />
	<rule ref="Squiz.WhiteSpace.CastSpacing" />
	<rule ref="Squiz.WhiteSpace.FunctionSpacing">
		<properties>
			<property name="spacing" value="1" />
		</properties>
	</rule>
	<rule ref="Squiz.WhiteSpace.OperatorSpacing">
		<properties>
			<property name="ignoreNewlines" value="true" />
		</properties>
	</rule>
</ruleset>