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

Breadcrumb

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

function HRTime::ensureNotNegative

Throws

InvalidArgumentException

1 call to HRTime::ensureNotNegative()
HRTime::__construct in vendor/phpunit/phpunit/src/Event/Value/Telemetry/HRTime.php

File

vendor/phpunit/phpunit/src/Event/Value/Telemetry/HRTime.php, line 83

Class

HRTime
@psalm-immutable

Namespace

PHPUnit\Event\Telemetry

Code

private function ensureNotNegative(int $value, string $type) : void {
    if ($value < 0) {
        throw new InvalidArgumentException(sprintf('Value for %s must not be negative.', $type));
    }
}
RSS feed
Powered by Drupal