You are here

public static property GlobalDrupalSniff::$baseClasses in Coder 8.2

Same name and namespace in other branches
  1. 8.3 coder_sniffer/DrupalPractice/Sniffs/Objects/GlobalDrupalSniff.php \DrupalPractice\Sniffs\Objects\GlobalDrupalSniff::baseClasses
  2. 8.3.x coder_sniffer/DrupalPractice/Sniffs/Objects/GlobalDrupalSniff.php \DrupalPractice\Sniffs\Objects\GlobalDrupalSniff::baseClasses

List of base classes where \Drupal should not be used in an extending class.

Type: string[]

File

coder_sniffer/DrupalPractice/Sniffs/Objects/GlobalDrupalSniff.php, line 31

Class

GlobalDrupalSniff
Checks that \Drupal::service() and friends is not used in forms, controllers, services.

Namespace

DrupalPractice\Sniffs\Objects

Code

public static $baseClasses = array(
  'BlockBase',
  'ConfigFormBase',
  'ContentEntityForm',
  'ControllerBase',
  'EntityForm',
  'EntityReferenceFormatterBase',
  'FileFormatterBase',
  'FormatterBase',
  'FormBase',
  'ImageFormatter',
  'ImageFormatterBase',
  'WidgetBase',
);