PHP code example of wearerequired / coding-standards

1. Go to this page and download the library: Download wearerequired/coding-standards library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

wearerequired / coding-standards example snippets

xml
<rule ref="WordPress.WP.I18n">
	<properties>
		<property name="text_domain" type="array">
			<element value="plugin-name"/>
		</property>
	</properties>
</rule>
xml
<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
	<properties>
		<property name="prefixes" type="array">
			<element value="Required\PluginName"/>
			<element value="plugin_name"/>
		</property>
	</properties>
</rule>
xml
<rule ref="WordPress.Files.FileName">
	<properties>
		<property name="is_theme" value="true" />
	</properties>
</rule>