public static function PHP_Token_Stream_CachingFactory::get

Parameters

string $filename:

Return value

PHP_Token_Stream

2 calls to PHP_Token_Stream_CachingFactory::get()
PHP_CodeCoverage_Report_Node_File::calculateStatistics in drupal/core/vendor/phpunit/php-code-coverage/PHP/CodeCoverage/Report/Node/File.php
Calculates coverage statistics for the file.
PHP_CodeCoverage_Util::getLinesToBeIgnored in drupal/core/vendor/phpunit/php-code-coverage/PHP/CodeCoverage/Util.php
Returns the lines of a source file that should be ignored.

File

drupal/core/vendor/phpunit/php-token-stream/PHP/Token/Stream/CachingFactory.php, line 65

Class

PHP_Token_Stream_CachingFactory
A caching factory for token stream objects.

Code

public static function get($filename) {
  if (!isset(self::$cache[$filename])) {
    self::$cache[$filename] = new PHP_Token_Stream($filename);
  }
  return self::$cache[$filename];
}