PHP code example of mrm-commerce / magento-coding-standard-phpcs

1. Go to this page and download the library: Download mrm-commerce/magento-coding-standard-phpcs 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/ */

    

mrm-commerce / magento-coding-standard-phpcs example snippets

 CodeSniffer Config installed_paths set to ../../magento/magento-coding-standard,../../mrm-commerce/magento-coding-standard-phpcs,../../mrm-commerce/phpcs-security-audit,../../phpcompatibility/php-compatibility,../../slevomat/coding-standard

   cd vendor/squizlabs/php_codesniffer/
   php ./bin/phpcs --config-set installed_paths ../../magento/magento-coding-standard,../../mrm-commerce/magento-coding-standard-phpcs,../../mrm-commerce/phpcs-security-audit,../../phpcompatibility/php-compatibility,../../slevomat/coding-standard
   

php vendor/bin/phpcs --standard=vendor/mrm-commerce/magento-coding-standard-phpcs/MrmCommerceMagento2CodingStandard/ruleset.xml vendor/your-vendor/

php vendor/bin/phpcs --runtime-set testVersion 7.4 --standard=vendor/mrm-commerce/magento-coding-standard-phpcs/MrmCommerceMagento2CodingStandard/ruleset.xml vendor/your-vendor/