Skip to content

Instantly share code, notes, and snippets.

View Liam-Power's full-sized avatar

Liam Hiscock Liam-Power

View GitHub Profile
<?php
namespace Drupal\Tests\module_tests\Traits;
use Drupal\Core\Config\FileStorage;
use Drupal\Core\Config\StorageInterface;
/**
* Trait for importing configuration from the sync directory.
*/
parameters:
level: 1
paths:
- web/modules/custom
reportUnmatchedIgnoredErrors: false
ignoreErrors:
# new static() is a best practice in Drupal, so we cannot fix that.
- "#^Unsafe usage of new static#"
<?xml version="1.0" encoding="UTF-8"?>
<ruleset name="drupal_phpcs_configuration">
<!-- From https://www.hashbangcode.com/article/drupal-9-using-phpcodesniffer-inspect-custom-code -->
<!-- Use Drupal and DrupalPractice standards. -->
<rule ref="Drupal"/>
<rule ref="DrupalPractice"/>
<!-- Inluce the extensions of the files we want to test. -->
<arg name="extensions" value="php,module,inc,install,test,profile,theme,css,info,txt,md,yml"/>