<?xml version="1.0"?>
<ruleset name="rest-api">
	<!-- This is not a standalone ruleset, but an extension of Wikibase's main phpcs
		config, from which it is loaded. -->

	<rule ref="Generic.PHP.RequireStrictTypes" />
	<rule ref="Generic.Arrays.ArrayIndent" />
	<rule ref="PEAR.Functions.FunctionCallSignature.Indent" />
	<rule ref="Squiz.Strings.DoubleQuoteUsage">
		<exclude name="Squiz.Strings.DoubleQuoteUsage.ContainsVar" />
	</rule>
	<rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHint">
		<exclude name="SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingTraversableTypeHintSpecification" />
	</rule>
	<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHint">
		<exclude name="SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingTraversableTypeHintSpecification" />
	</rule>
	<rule ref="SlevomatCodingStandard.TypeHints.PropertyTypeHint">
		<exclude name="SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingTraversableTypeHintSpecification" />
	</rule>
	<rule ref="SlevomatCodingStandard.TypeHints.UselessConstantTypeHint" />
	<rule ref="SlevomatCodingStandard.Files.TypeNameMatchesFileName">
		<properties>
			<property name="rootNamespaces" type="array">
				<element key="src" value="Wikibase\Repo\RestApi"/>
				<element key="tests/phpunit" value="Wikibase\Repo\Tests\RestApi"/>
			</property>
		</properties>
	</rule>
</ruleset>
