You are here

protected property GlobalClassSniff::$coreClasses in Coder 8.3

Same name and namespace in other branches
  1. 8.3.x coder_sniffer/DrupalPractice/Sniffs/Objects/GlobalClassSniff.php \DrupalPractice\Sniffs\Objects\GlobalClassSniff::coreClasses

Core class names that should not be called statically, mostly entity classes.

Type: string[]

File

coder_sniffer/DrupalPractice/Sniffs/Objects/GlobalClassSniff.php, line 33

Class

GlobalClassSniff
Checks that Node::load() calls and friends are not used in forms, controllers or services.

Namespace

DrupalPractice\Sniffs\Objects

Code

protected $coreClasses = [
  'Drupal\\Core\\Datetime\\Entity\\DateFormat',
  'Drupal\\Core\\Entity\\Entity\\EntityFormDisplay',
  'Drupal\\Core\\Entity\\Entity\\EntityFormMode',
  'Drupal\\Core\\Entity\\Entity\\EntityViewDisplay',
  'Drupal\\Core\\Entity\\Entity\\EntityViewMode',
  'Drupal\\Core\\Field\\Entity\\BaseFieldOverride',
  'Drupal\\aggregator\\Entity\\Feed',
  'Drupal\\aggregator\\Entity\\Item',
  'Drupal\\block\\Entity\\Block',
  'Drupal\\block_content\\Entity\\BlockContent',
  'Drupal\\block_content\\Entity\\BlockContentType',
  'Drupal\\comment\\Entity\\Comment',
  'Drupal\\comment\\Entity\\CommentType',
  'Drupal\\contact\\Entity\\ContactForm',
  'Drupal\\contact\\Entity\\Message',
  'Drupal\\content_moderation\\Entity\\ContentModerationState',
  'Drupal\\editor\\Entity\\Editor',
  'Drupal\\field\\Entity\\FieldConfig',
  'Drupal\\field\\Entity\\FieldStorageConfig',
  'Drupal\\file\\Entity\\File',
  'Drupal\\filter\\Entity\\FilterFormat',
  'Drupal\\image\\Entity\\ImageStyle',
  'Drupal\\language\\Entity\\ConfigurableLanguage',
  'Drupal\\language\\Entity\\ContentLanguageSettings',
  'Drupal\\media\\Entity\\Media',
  'Drupal\\media\\Entity\\MediaType',
  'Drupal\\menu_link_content\\Entity\\MenuLinkContent',
  'Drupal\\node\\Entity\\Node',
  'Drupal\\node\\Entity\\NodeType',
  'Drupal\\path_alias\\Entity\\PathAlias',
  'Drupal\\rdf\\Entity\\RdfMapping',
  'Drupal\\responsive_image\\Entity\\ResponsiveImageStyle',
  'Drupal\\rest\\Entity\\RestResourceConfig',
  'Drupal\\search\\Entity\\SearchPage',
  'Drupal\\shortcut\\Entity\\Shortcut',
  'Drupal\\shortcut\\Entity\\ShortcutSet',
  'Drupal\\system\\Entity\\Action',
  'Drupal\\system\\Entity\\Menu',
  'Drupal\\taxonomy\\Entity\\Term',
  'Drupal\\taxonomy\\Entity\\Vocabulary',
  'Drupal\\tour\\Entity\\Tour',
  'Drupal\\user\\Entity\\Role',
  'Drupal\\user\\Entity\\User',
  'Drupal\\views\\Entity\\View',
  'Drupal\\workflows\\Entity\\Workflow',
  'Drupal\\workspaces\\Entity\\Workspace',
];