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

Breadcrumb

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

function CodeUnit::ensureFileExistsAndIsReadable

Throws

InvalidCodeUnitException

1 call to CodeUnit::ensureFileExistsAndIsReadable()
CodeUnit::forFileWithAbsolutePath in vendor/sebastian/code-unit/src/CodeUnit.php

File

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

Class

CodeUnit
@psalm-immutable

Namespace

SebastianBergmann\CodeUnit

Code

private static function ensureFileExistsAndIsReadable(string $path) : void {
    if (!(file_exists($path) && is_readable($path))) {
        throw new InvalidCodeUnitException(sprintf('File "%s" does not exist or is not readable', $path));
    }
}

API Navigation

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