Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Registry.php

function Registry::getInstance

File

vendor/phpunit/phpunit/src/Metadata/Parser/Annotation/Registry.php, line 40

Class

Registry
Reflection information, and therefore DocBlock information, is static within a single PHP process. It is therefore okay to use a Singleton registry here.

Namespace

PHPUnit\Metadata\Annotation\Parser

Code

public static function getInstance() : self {
    return self::$instance ?? (self::$instance = new self());
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal