<?xml version="1.0"?>
<ruleset name="FeedHub WordPress Plugin">
	<description>PHPCS configuration for FeedHub WordPress plugin.</description>

	<!-- Use only WordPress-Core (no Docs or Extra) -->
	<rule ref="WordPress-Core">
		<!-- Allow snake_case method names (WordPress convention) -->
		<exclude name="WordPress.NamingConventions.ValidFunctionName"/>
	</rule>

	<!-- Add some essential checks from WordPress-Extra -->
	<rule ref="WordPress.WP.I18n"/>
	<rule ref="WordPress.Security"/>

	<!-- Ignore documentation rules completely -->
	<!-- No WordPress-Docs = no strict docblock requirements -->

	<!-- Allow longer lines -->
	<rule ref="Generic.Files.LineLength">
		<properties>
			<property name="lineLimit" value="200"/>
			<property name="absoluteLineLimit" value="0"/>
		</properties>
	</rule>

	<!-- Scan PHP files only -->
	<arg name="extensions" value="php"/>

	<!-- Ignore vendor directory -->
	<exclude-pattern>*/vendor/*</exclude-pattern>

	<!-- Main plugin file is not a class file -->
	<rule ref="WordPress.Files.FileName.InvalidClassFileName">
		<exclude-pattern>feedhub.php</exclude-pattern>
	</rule>

	<!-- Text domain for i18n -->
	<rule ref="WordPress.WP.I18n">
		<properties>
			<property name="text_domain" type="array">
				<element value="feedhub"/>
			</property>
		</properties>
	</rule>
</ruleset>
