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

Breadcrumb

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

function CodeUnit::forFileWithAbsolutePath

Throws

InvalidCodeUnitException

File

vendor/sebastian/code-unit/src/CodeUnit.php, line 82

Class

CodeUnit
@psalm-immutable

Namespace

SebastianBergmann\CodeUnit

Code

public static function forFileWithAbsolutePath(string $path) : FileUnit {
    self::ensureFileExistsAndIsReadable($path);
    return new FileUnit($path, $path, range(1, count(file($path))));
}

API Navigation

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